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> |