Remote debugging is fairly easy to set up.
Setting up the remote machine
- Install the remote debugging service. You can download it here or find it on the Visual Studio CD
In the configuration Wizard select “Run the “Visual Studio 2010 Remote Debugger” service ” and leave the user as LocalSystem
Under Configure the Firewall for Debugging select “Allow any user to connect to the remote debugger” if the machine you are debugging is on a different network.
If the Machine is on a workgroup you may need to edit the permissions to allow anyone to access the remote debugging service. Run the Visual Studio Remote Debugging Monitor
- Go to Tools > Options
- To Allow Full Access select “No Authentication” and “Allow any user to debug”
Connecting the remote debugger
To get the visual studio to debug the exact code you need to copy the .PDB file visual studio generates into the same folder the dll’s/exe is located. This can be copied out of the bin folder and must match the same code version as the dlls.
In Visual Studio attach the Debugger to the Process running on the Remote Machine
- 1. Go to Debug > Attach to process…
- Select Remote (Native only with no authentication) as the Transport
- Enter the IP Address or Machine name into “Qualifier”
- Select Refresh
- Select the process you are debugging and select Attached.
- Perform normal actions of the remote machine. You can set breakpoints as normal in Visual Studio