You cannot debug through a Terminal Server session

Microsoft states in their article: 323478

You cannot debug through a Terminal Server session
View products that this article applies to.
Article ID : 323478
Last Review : April 28, 2006
Revision : 2.1
This article was previously published under Q323478
On This Page
SYMPTOMS SYMPTOMS
CAUSE CAUSE
RESOLUTION RESOLUTION
To use the Task Manager To use the Task Manager
To use the AT.exe utility To use the AT.exe utility
STATUS STATUS
APPLIES TO APPLIES TO
SYMPTOMS
When you try to attach a native debugger over Terminal Services to a process that runs in another WinStation (including system processes), you receive the following error message:
Win32 error 5
"Access is denied."
Also, if you run AutoDump+ (which scripts the cdb.exe debugger) in -crash mode, you receive an error message similar to the following:
Autodump+ has detected that you are attempting to run in "Crash" mode, but this account is currently logged into terminal server session ID:RDP-TCP#8. "Crash" mode (invoked via the -crash switch) does not work inside a terminal server session. To run Autodump+ in "Crash" mode, please log in locally at the console.
Back to the top Back to the top
CAUSE
The debugger cannot attach to a process that runs in another WinStation.
Back to the top Back to the top
RESOLUTION
To work around this problem, you can attach noninvasively by using the -pv switch. Alternatively, you can schedule a task remotely by using the Task Manager or the AT.exe utility. You can either schedule the debugger to run, or you can schedule a remoted Cmd window.
Back to the top Back to the top
To use the Task Manager
1. Start Windows Explorer, and then locate \\remotemachinename.
2. Double-click the Scheduled Tasks icon.
3. On the File menu, click New, and then click Scheduled Task.
4. Give the new task a name, and then double-click the task to set the properties.
5. In the Run box, type one of the taskcommands described below.
6. On the Schedule tab, set the time for the task to start.

NOTE: Make sure you give a username and a password when you are prompted.
Back to the top Back to the top
To use the AT.exe utility
1. From the command prompt, type:

at.exe \\remotemachinename 12:00 taskcommand
2. Replace 12:00 with the time to start the task.
3. Replace taskcommand with one of the taskcommands below:
• To start your debugger directly (for example, adplus in -crash mode):

• c:\winnt\system32\cscript.exe "c:\program files\debugging tools for windows\adplus.vbs" -crash -iis -quiet

NOTE: When you start adplus.vbs remotely, remember to use the -quiet switch and to check the .log file for status.
• To start a remoted Cmd window:

• "c:\program files\debugging tools for windows\remote.exe" /s cmd myremotedcmd
• To connect from the client, you can run remote /c remotemachinename "myremotedcmd".
Back to the top Back to the top
STATUS
This behavior is by design.
Back to the top Back to the top
APPLIES TO
• Microsoft Windows NT Server 4.0, Terminal Server Edition
• Microsoft Windows 2000 Standard Edition
Back to the top Back to the top
Keywords:
kbprb KB323478



Primary links

Custom Search

Who's new

  • Rullydery
  • eagenorce
  • rittaarier
  • swasseZex
  • gaterfoko

Who's online

There are currently 0 users and 3 guests online.

KrissysCorner.com RuthSwensonLaw.com CreativeLizardProductions.com

DISCLAIMER:

None of this has anything to do with us, someone else is responsible for the entire thing, and we have no idea who or why. We do not know anything about it. It may be alien life forms for all we know: we haven't a clue. You cannot blame us for anything that may result from your visit. That was entirely your own personal choice, made by you of your own volition, and without our knowledge. We do not, after all, have any control over you and cannot by any stretch of the imagination be expected to accept or acknowledge, be it legally or morally, any accountability for decisions made by you on an independent basis, utilizing your own free will, and without our intervention. We are therefore in no way, shape, or form answerable to anyone for any consequences arising from the aforementioned or indeed any other actions, similar or otherwise, because it was not us that did, or did not do anything. It is not even remotely our fault, and we are in no way prepared or willing to accept any liability, not even slightly, ever. We are, in fact completely and utterly blameless, in that it is definitely not our concern, and no blame can possibly be laid at our doorstep, even if we had one, the possession of which we hereby reserve as being entirely our own free choice. The onus is not on us at all, and furthermore, never has been. The entire matter is wholly beyond our control, and completely out of our hands, each of which are washed scrupulously clean of the whole business. We are not accountable for anything at all, and we hereby categorically deny all responsibility for all that has ever, or will ever happen. Our innocence is therefore wholly beyond doubt and absolutely unimpeachable, and so cannot, under even the remotest or unlikeliest circumstances, be brought into question. By clicking either on a link on this site, clicking on a link that leads to this site, or by arriving at this site by natural or supernatural means, you are in effect accepting responsibility for the fact that it is all entirely your own fault, down to the most miniscule detail, and that you are wholly accountable for whatever outcome may arise as a consequence of the aforementioned action or actions insofar as they were undertaken personally by you on an entirely voluntary basis and without any persuasion, coercion or influence from any party or parties other than yourself. Don't come sniveling to us, we are only figments of your imagination. I also agree that if I am ever with a contributor to this website during mealtimes I agree to pay for any super-sizing of their meal, or at least a nice dessert or one of those foo-foo drinks with an umbrella or a monkey. By admitting to have seen the worthless spineless drivel on this website (also known as content)

I Agree Wholeheartedly and Without Reservation to the above. (Except maybe for that part about the monkey.)

All Your Base Are Belong To Us.

Soylent Green Is People!

Never make a bet with a Sicilian when Death is on the Line!

No. Really, I do agree.