The juxtacellular method allows recording individual neurons and subsequently labeling them in the intact brain. This allows to obtain the precise anatomical location of the recorded neurons and the identification of their molecular markers by means of immunohistochemistry or genetic tagging. By combining this recording/labeling method with optogenetics, we are able to manipulate specific inputs to individual neurons and characterize the dynamics of their modulation in a precise temporal scale. Furthermore, by labeling the recorded neurons in vivo, we are able to preserve and trace their entire axons and characterize their connectivity at the synaptic level. Thus, our experimental approach allows the integration of the input/output systems of neurochemically-defined types of neurons.