The phase evolution of optical waves in a waveguide structure has been studied with a heterodyne interferometric photon scanning tunneling microscope. Both phase and amplitude of the local optical field are measured with subwavelength resolution. Topographical maps of the waveguide surface are obtained simultaneously with the optical information. Unexpected phase patterns, with phase jumps and phase singularities, have been observed. The phase patterns can be fully understood by taking into account the total field that is the sum of the optical fields of the various modes. We show that with the unique spatial phase information, the relative field profiles and wave vectors of all the excited modes in a multimodal waveguide structure can be determined independently.