Cross domain remote debugging
WRITTEN BY Patrick Verbeeten - 29 April 2008
When you are developing with a virtual PC which is running in its own domain or want to debug any other system which is in a different domain than you own user remote debuggin will normally fail on authentication errors.
How do you set this up ...
Preparation:
- Copy the remote debugger files to you VPC. You can find these files in the folder Visual Studio installation folder Common7\IDE\RemoteDebugger.
- Create a domain account on the remote system with sufficient permissions. For full debugging this must be a local administrator or domain admin if the remote system is a domain controller.
- On your Development system create a local account with the same username and password as you used in step 2.
- On your Development PC open 'Stored user names and password' in the control panel. If this is not present here you can access it through the user accounts options, advanced tab, manage passwords. In this dialog add a new entry for the remote server (machine name is recommend) with the credentials created in step 2.
- If the machine name of the remote system cannot be resolved through DNS you must add an entry to the hosts file (C:\windows\System32\drivers\etc\hosts)
To use the debugger:
- On the remote system right click the msvsmon executable in the remote debugger directory and choose Run As.
- In the run as dialog enter the credentials of the local account you prepared.
- Note the server name given when the debugger starts.

- In visual studio choose Debug > Attach to process
- In the attach to process dialog using the name from debug monitor (step 3)
You should now be able to attach to any process running on the remote server.