Visual Studio 2015: Using The Remote Debugger
Intro
Most of this write up just summarizes what's talked about in this video: Visual Studio - How to Attach Debugger to a Remote Server
This Microsoft web page documents how to install and run the remote debugger: VS Remote Debugging Installation And Running
Prerequisites
- The Visual Studio Remote Debugger for 2015 is called rtools_setup_x64.exe
- To properly debug on a remote machine, you will need debug symbols for your code.
Install And Run The Remote Debugger
- Find rtools_setup_x64.exe, and install it on the remote server.
- After install, go to the Start menu and run Remote Debugger.
- You may have to configure the firewall, this can be done through the Remote Debugging Configuration dialog that the Remote Debugger launches. Allow everything.
- Once the remote debugger is running, go to the Tools menu and select Options.
- The port will probably be 4020, change this to 4016. I could not get 4020 to work.
- Tick No Authentication and Allow any user to debug.
- Click OK.
NOTE: These settings are not saved between runs of the Remote Debugger. You have to do this every time!
- You will now see the name of your server and port in the remote debugger dialog.
- Launch the application you want debugged.
- Now go to your local machine to connect to this remote machine.
Connect To Remote Machine From Local Machine
- Launch a local version of Visual Studio 2015 and load the solution you'd like to debug on the remote machine.
- Choose Debug -> Attach to Process...
- For Transport: choose Remote (no authentication)
- For Qualifier: type the name of the server and port as shown in the remote debugger UI on the remote machine. For instance: LA1DPTCNSVR103:4016
- Click Find...
- Your remote server should be listed in the Remote Connections dialog, click its entry then click the Select button.
- Find the process which you would like to debug. Select it and select Attach.
- You should now be attached to the remote process and can set breakpoints and debug using your local Visual Studio debugger.
Comments
Post a Comment