Police found a high-grade drugs farm worth up £60,000 by following a trail of cannabis leaves leading to the front door.
Officers had gone to Steven Goodin's address at Brabourne Street, in South Shields, after reports of a "strong smell of cannabis" in the area.
Ember Wong, prosecuting at Newcastle Crown Court, said that while on scene police "noticed a trail of cannabis leaves from the front door of the address, on to the pavement and on to the road".
A various failed attempts to contact the occupants, officers forced their way inside the address and discovered a rear bedroom had been dedicated to the production of cannabis. This happened in January.
Miss Wong added: "There were a number of plants suspended on lines across the ceiling and hanging baskets hanging from the ceiling."
The court heard the electricity at the flat had been by-passed and there was a pollen separator, air circulation fan and scales in the room, which appeared to be being used to "dry out" the cannabis crop.
Miss Wong said the value of the crop of 97 plants, which were "high quallity", was assessed as being worth between £30,622 and £61,300.
Goodin, a 29-year-old scaffolder, pleaded guilty to production of cannabis.
He confessed to police he had allowed his home to be used for the operation to pay off a drugs debt.
Judge Stephen Earl sentenced Goodin to two years imprisonment, suspended for two years, with a four month evening curfew, 180 hours unpaid work and rehabilitation requirements.
The judge said: "It was a significant crop to hit the streets at some stage."
The court heard Goodin is not heavily convicted and has no previous offences for drugs.
Jennifer Coxon, mitigating, said; "He owed money to drug dealers for his personal drug debt.
"The people have entered his property, asked him to essentially look after these plants and take responsibility for them while they are in his property in order to dry out.
"If he did that, he would essentially relieve himself of that drug debt."
Miss Coxon said Goodin has not worked since he committed the offence but has now got a new job.