Johnny Depp's crib was hit by a would-be burglar ... but fortunately for him and his neighbors, cops nabbed a suspect before she could get away.
Law enforcement sources tell TMZ ... a woman -- possibly homeless -- broke into Depp's Hollywood Hills home over the weekend. We're told the break-in triggered the home's security system and cops were called.
Our sources say the woman may have been spooked by the alarm system because she took off before cops arrived. But, get this ... cops say they found her nearby and also connected her to another recent burglary.
It's unclear if the woman took anything from Depp's home. The investigation's ongoing.