Recently, we can see that using dbgsrv and windbg for remote debugging is a good thing, but it is hard to follow the theoretical steps. After receiving help from multiple parties, I will share my experience with you. Please advise!
Please use the windbg version as follows: 6.12.2.633, which is available on the Microsoft official website and downloaded from csdn resources. Please note that. The release date of this version is Feb, 26,2010. because of a problem with the previous version (6.11.1.404), if you press F6 on the debugger to obtain the process information on the debugee, either: 1. Unable to connect to process server. 2. Even if you obtain the debugee process list, "unable to initialize the target machine information, Win32 error on87" appears when you select the process for debugging ".
The debugging and debuggee versions (debugging tools for Windows Installation packages) should be the same. I have not tried different situations.
Okay. The following describes how to use the dbgsrv and windbg processes for remote debugging:
1. Run the following command in debugee. Assume that your installation directory is as follows. The title bar of the windbg appears on my PS. I just want to explain my windbg version.
2. Enter the following command in the CMD of Debugger:
Then, the windbg of the debugger starts. The screen is as follows (an empty windbg session ):
Next, you can use F6 to bring up the process list on debuggee. Then you can choose to debug the process. If the source file or symbol file of the debugged process is on the debugger, you can set breakpoint debugging. In addition, you can create a new process for debugee In the debugger for debugging. The steps are as follows:
(1) enter the following command in the Command column of windbg:
. Create-premote TCP: Port = 9999, Server = 202.119.11.150 notepad.exe
After the preceding statement is executed, the following figure is displayed. The next debugging is like the common debugging of windbg.
Now, we can use dbgsrv and windbg for remote debugging. If you have any questions, we can communicate with you and hope to help you.