The doping process in GaP core-shell nanowire pn-junctions using different precursors is evaluated by mapping the nanowires' electrostatic potential distribution by means of off-axis electron holography. Three precursors, triethyltin (TESn), ditertiarybutylselenide, and silane are investigated for n-type doping of nanowire shells; among them, TESn is shown to be the most efficient precursor. Off-axis electron holography reveals higher electrostatic potentials in the regions of nanowire cores grown by the vapor-liquid-solid (VLS) mechanism (axial growth) than the regions grown parasitically by the vapor-solid (VS) mechanism (radial growth), attributed to different incorporation efficiency between VLS and VS of unintentional p-type carbon doping originating from the trimethylgallium precursor. This study shows that off-axis electron holography of doped nanowires is unique in terms of the ability to map the electrostatic potential and thereby the active dopant distribution with high spatial resolution. Using off-axis electron holography to investigate the doping process in GaP core-shell nanowire pn-junctions reveals that triethyltin is the most efficient precursor among triethyltin, ditertiarybutylselenide and silane for n-type doping of the shell and that the concentration of p-type dopants is higher in the region of core grown parasitically by vapor-solid mechanism due to unintentional carbon doping from trimethylgallium precursor.