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

  1. The Visual Studio Remote Debugger for 2015 is called rtools_setup_x64.exe
  2. To properly debug on a remote machine, you will need debug symbols for your code.

Install And Run The Remote Debugger

  1. Find rtools_setup_x64.exe, and install it on the remote server.
  2. After install, go to the Start menu and run Remote Debugger.
  3. You may have to configure the firewall, this can be done through the Remote Debugging Configuration dialog that the Remote Debugger launches.  Allow everything.
  4. Once the remote debugger is running, go to the Tools menu and select Options.
  5. The port will probably be 4020, change this to 4016.  I could not get 4020 to work.
  6. Tick No Authentication and Allow any user to debug.
  7. Click OK.

    NOTE: These settings are not saved between runs of the Remote Debugger.  You have to do this every time!


     
  8. You will now see the name of your server and port in the remote debugger dialog.


     
  9. Launch the application you want debugged.
  10. Now go to your local machine to connect to this remote machine.

Connect To Remote Machine From Local Machine

  1. Launch a local version of Visual Studio 2015 and load the solution you'd like to debug on the remote machine.
  2. Choose Debug -> Attach to Process...
  3. For Transport: choose Remote (no authentication)
  4. 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
  5. Click Find...
  6. Your remote server should be listed in the Remote Connections dialog, click its entry then click the Select button.

  7. Find the process which you would like to debug.  Select it and select Attach.


     
  8. You should now be attached to the remote process and can set breakpoints and debug using your local Visual Studio debugger.


Comments

Popular posts from this blog

FFMPEG Deinterlacing Modes

Remote debugging with GDB and GDBServer on Alpine and Visual Studio Code

Build FFMPEG for Windows Using Visual Studio Toolchain