High resolution measurements of the carrier profile in semiconductor devices is required as the semiconductor industry progresses from the 10-nm lithography node to 7-nm and beyond. We examine the factors which determine the resolution of the present method of scanning spreading resistance microscopy as well as such factors for the newer method of scanning frequency comb microscopy that is now under development. Also, for the first time, we consider the sensitivity of both methods to the location of heterogeneities in the semiconductor. In addition, mesoscopic effects on these measurements are considered for the first time. Two simple analytical models are extended to study the sensitivity to heterogeneities as well as mesoscopic effects.