Traditional plane-view TEM images, which have large fields of view and are usually used to check the existence of dislocations, cannot tell whether a dislocation goes through the p-n junction or not. While XTEM images tell the local depth of a small part of a dislocation only, other methods have to be developed to explore how a dislocation goes in the substrate. In this article, the authors have modified the technique of stereo TEM, which was used to study the 3D shapes of precipitates, to study how a dislocation runs in the Si substrate. Three images recorded after tilting the TEM sample were used for measuring the dislocation depth profile. The distances between a few chosen points on the dislocation and the reference line were measured from above three images. Results suggested that the depth profiles of dislocations in the Si substrate can be accurately determined by stereo TEM.