Aiden Kerridge, 18, was arrested as he targeted the property in Guiseley on March 23 this year.
Leeds Crown Court heard the couple and their five-year-old child who lived at the property went to bed at 10pm.
The woman who lived at the house heard voices outside at 2am and someone say: "Come on, we need to go."
She was awoken a short time later by police officers knocking on the door to inform her that someone had tried to break in to the house.
A neighbour contacted police after seeing the defendant and another male on the driveway looking through the window of an Audi Q3, worth £20,000, which was parked on the driveway.
Kerridge tried to run away when the officers arrived at the house on Nethercliffe Road but was caught.
Kerridge's accomplice managed to get away.
A snapped door lock was found in a neighbour's garden.
The woman described in a victim statement how she has been living in a "permanent state of anxiety" since the offence.
Frances Pencheon, prosecuting, said: "It was the first night of formal lockdown.
"She has had to spend considerable time and money putting security measures in place."
Kerridge and a 15-year-old male also tried to break into a house on King's Drive, Shipley, on January 4 this year.
The homeowner was at a nearby golf club when he received a notification to his phone from his CCTV equipment and saw two males in his back garden.
Police were alerted but the pair had gone by the time they arrived.
CCTV footage showed Kerridge trying the handle on the back door.
Kerridge, of Bolton Hall Road, Bradford, pleaded guilty to two counts of attempted burglary.
He has no previous convictions.
Christopher Styles, mitigating, said Kerridge had been in custody since being arrested in March.
He said the defendant offended to fund a £50-per-day cannabis habit after losing his job.
Mr Styles urged Judge Neil Clarke to consider imposing a suspended sentence so he can receive support to prevent him committing further offences.
Kerridge was given a 12-month prison sentence, suspended for 18 months.
He was also ordered to complete a 20-day rehabilitation activity requirement and 100 hours of unpaid work and abide by a three-month curfew.
Kerridge's accomplice is due to be sentenced at a youth court on July 15.