Dump File generation
If you need to use windbg to generate a dump file, you can use. dump command, which can be connected to/m or/F to generate minidump and fulldump./m can be followed by more command control, such as/F to generate memory dump, it is usually used. dump/MF to generate dump. Such minidump contains more debugging information than fulldump.
Dump handle information
In minidump, if you want to dump the handle information (such as handle leakage debugging may need to be used! Handle command), you need to add the/h Parameter, such as. Dump/MFH
Post-event debugger settings
The debugger is an instant debugger. For example, if a process crashes during running, a dialog box Indicating whether to debug is automatically displayed if the debugger is set. The Registry path of the debugger afterwards is
HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \ AeDebug
AeDebug has two important key values: auto and debugger. Auto indicates whether to display a message box when a crash occurs, 0 indicates display, and 1 indicates not display (that is, xxProgramWhen an error occurs, close the prompt dialog box). Debugger specifies which debugger is used after the event. Generally, the debugger provides a GUI, and we do not need to modify the Registry manually.
Debug handle leakage afterwards
! The htrace command can no longer be used in the dump file, so we need to pass it when dumping the dump file! The htrace command outputs information to the log. You can use ". logopen FILENAME" and ". logclose" to generate a log file, and then use the log file to analyze dump.
Use adplus to generate a dump file
Switch to the directory where windbg.exe is located, and run "adplus. vbs {-Hang |-crash} {-PN process |-p pid} [-O Directory] "to generate a dump file;-Hang indicates generating a dump file for a suspended program; -Crash indicates that the dump file is generated when the real-time monitoring process reaches its crash.-PN indicates the process name,-P indicates the PID, and-O indicates the output directory.
If the message "The following requested processes are not executing-error in adplus. vbs" is displayed, upgrade your windbg to the latest version.
Dump File collection
Currently, all products in Alibaba have dumpreporting mechanisms. For example, you can find programs such as xlbugreport.exe in the thunder installation directory. Some programs will first check whether the bugreport program is complete when it is started, and refuse to run the programs if it is incomplete.
Microsoft Error Reporting Service (wer)
In addition to collecting dump and uploading it to the server, you can also collect error reports by using Windows. This requires you to register the Microsoft Error Reporting Service (wer: Windows Error Reporting), which is troublesome, some services are charged.
This blog seldom reposts othersArticleIf not explicitly indicated, all are original. for reprinting, please indicate the source:
This article is from program life> windbg debugging later
Author:CodeMadman