VS remote debugging method

Install the released program on a machine without VS2015, and run abnormally, but there will be no abnormality on the development machine. Therefore, remote debugging is used. The following describes how to start remote debugging. 
Step 1: Copy x86 under the folder C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Remote Debugger to the virtual machine.

Write picture description here

Start msvsmon.exe in the virtual machine, as shown below: 
Write picture description here

Set the authentication mode on the virtual machine to no authentication, that is, disable authentication. 
Write picture description here

Step 2: Turn off the firewall, or set to allow remote debugging.

Step 3: Copy the program to the virtual machine. execute program.

Step 4: Click VS2015 Debug on the main machine -> Attach to process. The settings are as follows: 
Write picture description here
attach the test program to the process: 
Write picture description here
we can start debugging now 
Write picture description here

important hint: 

1. The default setting of IIS6 is to recycle the w3wp process if no request comes in for 20 minutes. When a new request comes in again, a new process will be started automatically.

2. Remember to copy the PDB to the remote machine before debugging

Guess you like

Origin blog.csdn.net/qq503690160/article/details/79709175