Thursday, November 13, 2014

Setup Remote Debugging in Visual Studio 2013

Sometimes you need to debug an application running on a different server than the one you have Visual Studio installed on.  You can install something called Remote Tools for Visual Studio on the server where the application is running and debug from the other machine.
  1. Download Remote Tools for Visual Studio 20XX Update X.  Make sure you download the version and update number that matches your version of Visual Studio.
  2. Install it on the remote server.
  3. On the remote server, start up the application called Remote Debugger as administrator.
  4. In Visual Studio, choose Attach to Process in the Debug menu.
  5. Type the name of the server, and click "Refresh".
  6. Highlight any instances of w3wp.exe (assuming you are debugging a web app), and click attach.
You must remember that in order for this to work, you have to build your application in debug configuration, so that the .pdb files are deployed to the remote server.