Remote debugging from Visual Studio 2008 on a domain machine to a machine not on the domain
This details how you can debug an application running on a remote machine from Visual Studio on your local machine, as if the remote application was running on your local machine. The keys are:
- There must be a user account with the same username and password on the remote machine and the local machine (MACHINE account, not domain account).
- Visual Studio 2008 Remote Debugger must be installed and running on the remote machine under the user account in point 1
Create local machine account
- Right click My Computer > Manage
- Expand Computer Management > System Tools > Local Users and Groups
- Right-click Users under Local Users and Groups and choose New User…
- Enter in the username e.g. DebugUser
- Enter and confirm the password
- Un-check “User must change password at next login” and tick “Password never expire”
- Click Create
- Click Close
Create remote machine account
- Log on to the remote machine and repeat the steps for “Create local machine account”
- You must use the same username and password
- Find the user in the Users list and double-click to edit them
- Go to the Member Of tab
- Click Add…
- Type in Administrators and hit Enter or click OK
- Click OK
Run Visual Studio 2008 Remote DebuggerYou have several options for launching the Remote Debugger.
- If you install Visual Studio 2008, the Remote Debugger folder can be found in %ProgramFiles%Microsoft Visual Studio 9.0Common7IDE. In the Remote Debugger folder are separate folders for the x86 and x64 versions. Perhaps the easiest solution is to share this folder over the network, allowing you to launch the debugger over the network without having to install anything on the remote machine.
- Alternatively, you can find the Remote Debugger setup on the first disc for the Visual Studio 2008 setup, in a sub folder called Remote Debugger.
- Or, you can download it from here
Connect to the remote machine with Visual Studio
- In Visual Studio on your local machine, go to Debug > Attach to process…
- Make sure the Transport drop-down at the top is set to Default
- In Qualifier, type in the name of the Remote Debugger instance e.g. DebugUser@RemoteMachineName and hit Enter
- You should then see the list of remote processes in the list and can select the one you want and click Attach.