Somatic sexual dimorphisms outside of the nervous system in Drosophila melanogaster are largely controlled by the male- and female-specific Doublesex transcription factors (DSX(M) and DSX(F), respectively). The DSX proteins must act at the right times and places in development to regulate the diverse array of genes that sculpt male and female characteristics across a variety of tissues. To explore how cellular and developmental contexts integrate with doublesex (dsx) gene function, we focused on the sexually dimorphic number of gustatory sense organs (GSOs) in the foreleg. We show that DSX(M) and DSX(F) promote and repress GSO formation, respectively, and that their relative contribution to this dimorphism varies along the proximodistal axis of the foreleg. Our results suggest that the DSX proteins impact specification of the gustatory sensory organ precursors (SOPs). DSX(F) then acts later in the foreleg to regulate gustatory receptor neuron axon guidance. These results suggest that the foreleg provides a unique opportunity for examining the context-dependent functions of DSX.