Use dbgsrv and windbg for remote debugging

Source: Internet
Author: User

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.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.