Environment:
A, run test.exe, and msvsmon.exe (Microsoft Remote debugging Monitor, which can be downloaded from the Microsoft website, and is also available on the vs installation CD)
Host B, run Visual Studio, open the project test (in order to locate the test. PDB file and the test. cpp source file, the windbg debugging method has not been tested ).
Steps:
Select "debug"> "attach to process" on host B (or CTRL + ALT + p)-> remote (enter the IP address of host a). If the network speed is fast, you can view the process list on remote host a immediately. Otherwise, wait a moment. Select test.exe to start debugging. At this time, the debugger loads the PDB file on host B and searches for the corresponding source files.
Note:
1. In simple mode, shut down the fire wall on Agent A, and set the msvsmon.exe mode to "unauthenticated ";
2. For simplicity, let msvsmon run as an administrator (It is dangerous to allow unauthorized access to the Administrator through debugging, preferably a LAN.) To debug allProgram, Including services.