Detection of boundary-layer transition with a laser beam