Neurons in cortical sensory regions receive modality-specific information through synapses that are located on their dendrites. Recently, the use of two-photon microscopy combined with whole-cell recordings has helped to identify visually evoked dendritic calcium signals in mouse visual cortical neurons in vivo. The calcium signals are restricted to small dendritic domains ('hotspots') and they represent visual synaptic inputs that are highly tuned for orientation and direction. This protocol describes the experimental procedures for the recording and the analysis of these visually evoked dendritic calcium signals. The key points of this method include delivery of fluorescent calcium indicators through the recording patch pipette, selection of an appropriate optical plane with many dendrites, hyperpolarization of the membrane potential and two-photon imaging. The whole protocol can be completed in 5-6 h, including 1-2 h of two-photon calcium imaging in combination with stable whole-cell recordings.