  We theoretically investigate the mapping of the supercurrent distribution in
a planar superconductor-normal-superconductor junction in the presence of a
perpendicular magnetic field via the scanning gate microscopy technique. We
find that the distribution of counter-propagating supercurrents aligned in
Josephson vortices can be mapped by the change of the critical current induced
by the tip of the scanning probe, if the flux in the junction is set close to
maxima of the Fraunhofer pattern. Instead, when the magnetic field drives the
junction to a supercurrent minimum in the Fraunhofer pattern, the
superconducting phase adapts, and the tip always increases the supercurrent.
The perpendicular magnetic field leads to the formation of Josephson vortices,
whose extension for highly transparent junctions depends on the current
circulation direction. We show that this leads to an asymmetric supercurrent
distribution in the junction and that this can be revealed by scanning gate
microscopy. We explain our findings on the basis of numerical calculations for
both short- and long-junction limits and provide a phenomenological model for
the observed phenomena.
