In CyberTech: War of the Worlds, Dumbledore is captured by the good guys, manages to escape the prison, and, once he gets into Hogwarts, tells Snape to recover some prisoners from the Headquarters. Snape replies he can't get them all by himself, so Albus is forced to give Flitwick the location as well. Cue the illusion dissolving...
In The Icewind Dale Trilogy, Bruenor is given a potion to drive him back into his childhood, and make him remember the location of his lost homeland. When he cannot tell it because it is secret, Drizzt enhances the illusion by pretending to be an ally coming with an army to help Bruenor.
In one episode of V.I.P., Val and Tasha are kidnapped and drugged after they hide a witness in a safehouse. In order to make them reveal the secret, the villain attempts to convince them they've been comatose for 40 years.
There was an episode of Galidor where one of Gorm's minions created a virtual reality simulation of Allegra's bedroom to convince her it was All Just a Dream, and get her to talk about her adventures. Nick managed to break the illusion before she revealed any dangerous information.
Subverted in another Star Trek episode, where Riker thinks he is a victim of one (he is supposedly in the future but his supposed wife is a woman of his dreams, that he knows never existed outside the holodeck. The hostile aliens reveal themselves when he calls them out on it. However, as it turns out the aliens aren't real either - there is just one alien, highly psychic and very lonely, keeping Riker in a Lotus-Eater Machine to have some company and conjuring things from his mind - the whole espionage plot was accidently created by Riker's own fears.
The Hardy Boys Nancy Drew Mysteries: "Sole Survivor", where Joe wakes up in a hospital room with no clue where he is or how he got there, only to be told that he's not only been in a coma for a year, but that his father and brother are dead. Cue fake newspapers, fake newscasts, and forged letters from all his surviving relatives and friends. Of course, Frank and Fenton are very much alive, and the whole thing is a Mind Screw to get Joe to reveal information on a defection attempt.
Alias: Sidney's father suffered from a Tap on the Head and now thinks he's back in the 1970s with his wife and young daughter. So Sidney has to pretend to be her own mother, married to her father, in order to get her father to give up some secret codes.
Not done with technology, but in a combination of this idea and Two Plus Torture Equals Five, the British spy protagonist of The Ipcress File is captured and held by enemy spies in a secret location in London. As part of an attempt to break him mentally and physically, his captors try to convince him that he's a criminal and traitor being held in an Eastern European prison. This includes having him visited by a spy pretending to be a representative of the Foreign Office, and thus a friendly face.
The Prisoner TOS episode "The Chimes of Big Ben". Number 6 escapes the Village and is transported to London, where he meets a former superior. As he's about to explain why he resigned, he realizes that the situation has been faked to trick him and discovers he's still in the Village.
In "A, B and C". Number Six is drugged and hooked up to a machine that controls his dreams. He meets several characters who try to get him to confess why he resigned. Eventually he figures out what's going on and arranges to take control of the dream.
Legend of the Seeker Season 1, Episode 12 "Home" is driven by this plot device. Darken Rahl has his pet wizard trap Richard in a dream about his home. Inside the dream, Rahl takes on several different characters to try and convince Richard that the goings-on of the series so far was all just a dream to learn the location of one of the boxes of Orden from him. Ultimately, the power of love combined with Rahl pushing too hard breaks the spell at the last moment.
Stargate SG-1 features season 2, episode 22, a Clip Show where one of the plotlines is where O'Neill, Carter and Daniel awaken from stasis in what appears to be the SGC, almost 79 years in the future. They discover it is actually a Goa'uld hoax by Hathor.
In Vagrant Story, when Guildenstern is interrogating Hardin about the nature of the Gran Grimoire, he uses magic to create an illusion of Hardin's mentor, Sydney, rescuing him. Then he tricks him into revealing what he knows.
In the 11th episode of Green Lantern: The Animated Series, the heroes need to get a code for an ancient Cool Gate from a prisoner. First, he gives them a code. Then, the bad guys capture them, and he gives them another code. Then, he is released, flies away, gets to the gate, and uses a third code (that one works). Then, the Properly Paranoid heroes remove his VR helmet.
A variation is present in an episode of Invader Zim. Zim puts Dib in a virtual reality where he gains ultimate power and uses it to defeat the Irken and become a major celebrity just so he could get Dib to confess that he threw a muffin at him during lunch.
In the second season of The Avengers: Earth's Mightiest Heroes, after a prolonged period of torturing (off-screen) for information without success, Captain America's Skrull captors have his next interrogation "interrupted" by a rescue by the other Avengers (actually shapeshifted Skrull). It doesn't work though, as Captain America sees through it immediately.
In Futurama MOM wanted to get Fry's bank information. Since his PIN was related to his old job in the twentieth century, her sons set up an elaborate hoax to convince him that coming to the future was All Just a Dream and he was back in his old life.
An episode of Buzz Lightyear of Star Command uses the Faked Rip Van Winkle varient; he's convinced a Negative Space Wedgie transported him into the future and destroyed Zerg. In reality, the "mueseum pieces" are his actual armour, the kids he's telling stories (and weaknesses) to are robots and Zerg is alive, well and showing Buzz's captive crew the whole setup to taunt them.
Five hats means that five tropers think it is ready to publish.
You are saying that you think this draft is ready to be published. That means the description is not ambiguous,
it doesn't duplicate an existing trope, there are at least three examples, and the title makes sense.
Is that what you meant to do?
You are saying this draft has a ready-to-publish hat it does not deserve and you are taking it back.