Remote Debugging Under Another User Account
For security reasons, the Visual Studio debugger restricts the following types of remote debugging:
- A user running Visual Studio cannot launch or attach to remote processes running under another user's Terminal Server session.
- A user who is not an administrator on the remote machine cannot attach to processes started by the console user on that machine, unless the console user and the debugger user have the same user account.
- A user who is not an administrator on the remote machine cannot attach to services on that machine.
- A user cannot launch processes on the remote machine unless the user is logged onto the remote machine (locally or through Terminal Server.)
You can overcome these restrictions if the following registry key is set on the remote machine:
HKEY_LOCAL_MACHINE \Software\Microsoft\Machine Debug Manager\AllowLaunchAsOtherUser
For scenarios 3 and 4, you also need to have an administrator logged into the server console while you are debugging.
To setup the remote server to allow impersonation of another user account
Caution Adding users to the Debugger Users group may create a security risk by allowing those users to access the machine. You should add only those users that need debugger access on that particular machine. Do not add Everyone to the Debugger Users group.
- Using Administrative Tools, add YourAccount to the Debugger Users group. (For more information, see Setting Debug Permissions on Windows 2000.)
- Using regedit.exe, set the value of the DWORD
HKEY_LOCAL_MACHINE\Software\Microsoft\Machine Debug Manager\AllowLaunchAsOtherUser
To debug another user account on the remote server
- Make sure the server has been set up correctly according the procedure above.
- Log into the console of the server using an administrator account (AdminAccount). An administrator must be logged into the server console during remote debugging.