We show that secondary electrons in a scanning electron microscope can provide important information about spatial dopant distribution in p-i-n GaN structures, with the highest contrast observed for a primary electron beam accelerating voltage in the range of 1 to 2 kV. The current through the specimen is used to determine the total backscattered and secondary electron yield. We establish a correlation between the secondary electron emission intensity and the doping characteristics of the material. The secondary electron emission intensity was found to be highest for p-type GaN, intermediate for n-type GaN, and lowest for undoped GaN. Specimen currents are found to have a strong correlation with the Mg concentration in p-GaN films. The contrast associated with dopants is shown to depend on experimental parameters such as primary electron beam voltage, total electron beam exposure, and specimen surface history. This technique can serve as a powerful tool for the development and characterization of thin films for GaN power electronics.