Background: In stalk-eyed flies (Diopsidae) the eyes and antennae are laterally displaced at the ends of elongated eyestalks. Eyespan and the degree of sexual dimorphism in eyespan vary considerably between species and several sexually dimorphic species show sexual selection through female mate preference for males with exaggerated eyespan. The genes on which selection acts to regulate eyespan remain to be identified. This could be achieved by comparing gene expression during eyestalk development in males and females if the sex of pre-adult flies could be reliably assigned. Here we describe two techniques, one morphological and one microsatellite-based, that identify the sex of stalk-eyed fly larvae and pupae. Results: We showed that genital discs of the stalk-eyed fly Teleopsis dalmanni have two highly distinct morphologies, compact ("C") and lobed ("L"). Segment composition (revealed by Engrailed expression) was consistent with C morphology being typical of males and L morphology of females. We confirmed the proposed association between disc morphology and sex by evaluating the combined heterozygosity of four X-linked microsatellite markers. We demonstrated that individuals with C genital discs had hemizygous (male) genotypes while those with L discs were heterozygous (female) genotypes. Similar dimorphism in genital disc morphology was observed in eight other species spanning three representative Diopsid genera. In every case the segment composition supported C morphology being male and L morphology female. We assigned larval sex by C or L morphology and compared cell division frequencies in male and female eye-antennal discs in two species (T. dalmanni and Diasemopsis meigenii) sexually dimorphic for eyespan. The number of mitotic (anti-H3-labelled) cells did not differ between the sexes in either species. Conclusion: We have made novel use of two complementary techniques for identifying the sex of pre-adult stalk-eyed flies. These procedures will facilitate studies of the evolution of sexually dimorphic development in a variety of other species. Morphology and En expression in male and female genital discs are highly conserved within each genus of Diopsidae. Finally, sexual dimorphism for eyespan in two Diopsid species is unlikely to be due to an increased rate of cell division at the third larval instar in males.