- 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.
- Install it on the remote server.
- On the remote server, start up the application called Remote Debugger as administrator.
- In Visual Studio, choose Attach to Process in the Debug menu.
- Type the name of the server, and click "Refresh".
- 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.