How to configure post-mortem debugging (postmortem debugger)

Source: Internet
Author: User

Set windbg as the default post-mortem debugger and set the default post-mortem Debugger for the windbg unmanaged program.

Windbg-I

Note: I must be capitalized.

Set windbg as the default autopsy Debugger for hosting programs

Reg add HKLM/software/Microsoft/. netframework/V dbgmanageddebugger/T REG_SZ/D "C:/debuggers/windbg.exe-P % lD"/F

Reg add HKLM/software/Microsoft/. netframework/V dbgjitdebuglaunchsetting/T REG_DWORD/D 2/F

Note: In Vista and Longhorn, you must run the preceding command in the administrator window.

Set ntsd as the default autopsy debugger and set the default autopsy Debugger for ntsd unmanaged programs

Ntsd-IAE

Set ntsd as the default autopsy Debugger for hosting programs

Reg add HKLM/software/Microsoft/. netframework/V dbgmanageddebugger/T REG_SZ/D "C:/debuggers/ntsd.exe-P % lD"/F

Reg add HKLM/software/Microsoft/. netframework/V dbgjitdebuglaunchsetting/T REG_DWORD/D 2/F

Note: In Vista and Longhorn, you must run the preceding command in the administrator window.

Set the default autopsy Debugger for the win form program.

When your windows form program crashes (crash), you will find that the default autopsy debugger you set does not run, because the win form program disables instant debugging by default (JIT Debug). Therefore, you must set the default autopsy Debugger for the win form program. In addition to the above steps, you must enable the instant debugging function of the win form program. Open method:

1. Modify the machine. config file of your machine so that all win form programs on the machine will enable this instant debugging function.

Add the following line in <configuration>:

<System. Windows. Forms jitdebugging = "true"/>

 

2. Modify the app. config file of the individual program to enable the instant debugging function of a single win form program. Add the following line in <configuration>:

<System. Windows. Forms jitdebugging = "true"/>

For example:

<? XML version = "1.0" encoding = "UTF-8"?>

<Configuration>

<System. Windows. Forms jitdebugging = "true"/>

</Configuration>

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.