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.
Start msvsmon.exe in the virtual machine, as shown below:
Set the authentication mode on the virtual machine to no authentication, that is, disable authentication.
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:
attach the test program to the process:
we can start debugging now
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