A teenage drug addict accused of breaking into a solicitors' office is linked by fingerprints on a cannabis-smoking bong left behind, the High Court heard today.
DNA matches were also made on blood found at the premises he allegedly wrecked in Derry, prosecutors said.
The 17-year-old accused faces a charge of burglary with intent to cause unlawful damage over the raid.
He was granted bail after a judge was told how he has since tried to commit suicide by jumping from the city's Peace Bridge.
The break-in took place at unidentified offices in the city on July 10.
Prosecution barrister Philip Henry said roof tiles were pulled off, glass smashed and blood smeared over the walls.
A vodka bottle and improvised cannabis bong were left at the scene.
"The link between this applicant was a forensic DNA profile taken from blood at the scene," Mr Henry said.
"Also, his fingerprints were found on the cannabis bong."
Defence counsel Sean Doherty said the break-in was being admitted.
He set out details of his client's mental health problems and addiction to both cannabis and diazepam.
"He recently attempted to take his own life by jumping off the Peace Bridge in Derry City," the barrister added.
With the teenager facing further charges over separate incidents, Mr Justice Treacy indicated there was a risk of further offences.
But he decided to grant bail to live in supported accommodate after citing other "complexities" in the case.
Imposing a curfew and electronic tagging, the judge warned: "If the applicant breaches his bail he will be back inside and will have only himself to blame."