Cameron Douglas, the troubled son of actor Michael Douglas, dodged a return trip to Prison on Wednesday. Two months after the felon tested positive for marijuana, a Manhattan federal judge agreed with probation officers' recommendations to give the 38-year-old a second chance to get his act together.

Three failed drug tests

Court records, obtained by Page Six, show that Douglas tested positive for the illegal substance in April. At the time, a lab tech accused Cameron Douglas of attempting to manipulate the results of an April 10 drug test. The accusation led to authorities testing Douglas' sample three times, with Douglas failing each test.

Sweat patches show no drug use since April

Shortly after the April incident, probation officers began requiring Douglas, the only child of Michael and ex-wife Diandra, to wear "sweat patches." The tamper-resistant sticker, which can pick up trace amounts of drugs in a person's sweat, is a commonly used tool to check for traces of cocaine, amphetamines, opiates, PCP, and marijuana in the body.

According to Douglas' probation officers, Cameron's "sweat patches" showed that the former actor had been clean since the April episode. Based on those results, authorities asked Judge Richard Berman to allow Cameron Douglas to continue seeking treatment outside of prison. Douglas in currently participating in a treatment program, which requires him to attend therapy daily.

Received permission to visit grandfather

After Berman agreed with the officers' recommendations, Douglas' attorney requested that Cameron be allowed to travel outside of New York, something he hasn't been able to do since being released from prison last year.

Last December, Douglas requested permission to fly to California to attend the 100th birthday party for his grandfather, Hollywood icon Kirk Douglas.

The request was denied, which Douglas purportedly being told that he could only travel for funerals.

On Wednesday, though, Berman agreed to allow Douglas to take a trip to visit his grandfather. Outside of court, Douglas made sure to inform reporters that the trip was not due to any health concerns of the "Spartacus" star.

Original sentence was extended for attempted smuggling

In 2009, Cameron Douglas was arrested for distributing methamphetamine, after getting ensnared in a three-year investigation by the Drug Enforcement Agency.

While on house arrest, his then-girlfriend Kelly Scott was caught trying to bring him heroin hidden inside a toothbrush. Scott served seven months for the crime.

In 2010, Douglas pleaded guilty to dealing meth and cocaine. While he faced a mandatory 10-year sentence, Berman opted to sentence Cameron to only five years. However, the judge tacked on an additional four years after learning that Jennifer Ridha, Douglas' attorney, had attempted to smuggle drugs into prison on four separate occasions.

Originally scheduled for release in 2018, Cameron was moved from prison to a Bronx halfway house last summer. In March, he was released on parole and allowed to live with his mother.

Hoping to become a productive member of society

Cameron Douglas is hoping to overcome whatever may remain of his demons. In addition to therapy, Douglas' attorney revealed that Cameron is seeing a psychiatrist to help him overcome PTSD suffered during his time in prison. Douglas served more than two years of his sentence in solitary confinement and was attacked by an inmate in 2012.

Since being released from prison, Cameron Douglas has been working on a tell-all book. The book is expected to reveal what life was like growing up as the son and grandson to two Hollywood legends, as well as what prompted him to turn to a life of drugs.

Douglas, who remains in a relationship with long-time love Viviane Thibes, is said to be sober and focused on recovery. He is expected to continue his therapy and regular drug tests, as he sets out to prove that he has turned his life around.