Bri*_*sen 17
运行windbg -I以在默认的事后调试器中安装它.
正如Kurt在下面指出的那样,WinDbg有32位和64位版本.执行windbg -I为与调试器的位数相对应的进程设置事后调试器.
如果需要同时提供32位和64位版本,可以并排安装两个版本的WinDbg.
从帮助文件:
-I[S]安装WinDbg作为事后调试程序.有关详细信息,请参阅启用事后调试.尝试此操作后,将显示成功或失败消息.如果包含S,则如果成功,则以静默方式执行此过程; 仅显示失败消息.-I参数不得与任何其他参数一起使用.虽然WinDbg窗口可能会出现片刻,但此命令实际上不会启动WinDbg.
这是一个用于将WinDbg设置为托管调试器和本机调试器的注册表文件:
Windows Registry Editor Version 5.00
;This reg file installs just-in-time debuggers to capture a dump of all process
;crashes for the machine.
;
;Assumes 32-bit debugger is cdb.exe and is installed to C:\debuggers\x86\.
;Assumes 64-bit debugger is cdb.exe and is installed to C:\debuggers\x64\.
;
;Assumes crash dumps can be written to C:\crash_dumps\.
;Make sure all users have write access to this directory.
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework]
"DbgManagedDebugger"="\"c:\\debuggers\\x64\\windbg.exe\" -pv -p %ld "
"DbgJITDebugLaunchSetting"=dword:00000002
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug]
"Debugger"="\"c:\\debuggers\\x64\\windbg.exe\" -pv -p %ld "
"Auto"="1"
;The following keys are only used on 64-bit versions of Windows (note Wow6432Node).
;They can be safely created with no side-effects on 32-bit versions of Windows.
;Alternatively, you can delete the remainder of this file if you’re running a
;32-bit version of Windows.
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug]
"Debugger"="\"c:\\debuggers\\x86\\windbg.exe\" -pv -p %ld "
"Auto"="1"
当进程崩溃时自动捕获转储是CLR团队对此的一个写入.