1.在HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options下,建一个项,比如DNF,就叫DNF.exe,
2.再在右边建一个 子项叫
Debugger 类型REG_SZ,填上windbg的地址,
3.再用windbg -I(大写)设置为默认调试器,之后就可以直接在dnf.exe起来时直接附加上.
4.如果想用vs调试,就使用以下:
- Windows Registry Editor Version 5.00
- [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\1.exe]
- "debugger"="vsjitdebugger.exe"
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\1.exe]
"debugger"="vsjitdebugger.exe"
这时先开1.exe的vs代码,1.exe被拉起后,会弹出选择,选vs代码运行即可
本文介绍如何通过修改注册表配置来指定Windbg或Visual Studio作为特定进程的默认调试器,实现进程启动时自动附加调试器的功能。

3万+

被折叠的 条评论
为什么被折叠?



