发布于 2011-09-14 16:32:46
您应该以管理员身份运行应用程序(不要将vsjitdebugger.exe设置为管理员)。然后,系统会提示您使用安全警告,并在该正常列表之后使用调试器进行选择。在我的例子中,我不得不作为一个管理员程序运行,运行调试程序。
发布于 2018-11-26 19:09:04
因此,在寻找这个问题的解决方案之后,我找到了答案这里。对我来说,问题是调试器注册表单元没有正确设置。这很明显是因为错过了Auto
条目,尽管我不是肯定的。升级到Windows 10之前,我没有这个问题。注册表项必须是:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug]
"Auto"="1"
"Debugger"="\"C:\\WINDOWS\\system32\\vsjitdebugger.exe\" -p %ld -e %ld"
"UserDebuggerHotKey"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug]
"Auto"="1"
"Debugger"="\"C:\\WINDOWS\\system32\\vsjitdebugger.exe\" -p %ld -e %ld"
"UserDebuggerHotKey"=dword:00000000
若要禁用JIT调试,请使用:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug]
"Auto"="1"
"Debugger"=-
"UserDebuggerHotKey"=-
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug]
"Auto"="1"
"Debugger"=-
"UserDebuggerHotKey"=-
只是一个FYI,我编写了一个简单的cmd脚本,在每个可执行文件名的基础上启用/禁用。我把它贴在这里是为了方便你:
@echo off
if %1.==. goto help
if %1==/internal goto apply
if %1==/d (
%0 /internal %2 -
) else (
%0 /internal %1 "vsjitdebugger.exe"
)
goto help
:apply
shift
>%temp%\output.reg echo Windows Registry Editor Version 5.00
>>%temp%\output.reg echo+
if %2 == - (
: Delete registry key
>>%temp%\output.reg echo [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\%~1]
) else (
: Add registry key
>>%temp%\output.reg echo [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\%~1]
>>%temp%\output.reg echo "debugger"=%2
)
:In case you want to see what it is importing, uncomment the following 3 lines
:echo %temp%\output.reg
:echo --------------------
:type %temp%\output.reg
regedit /s %temp%\output.reg
del %temp%\output.reg
goto :eof
:help
echo %0 [/d] ^<executable.exe^>
echo.
echo Allows you to attach a debugger as soon as the process executes anywhere in the
echo system. If /d switch is provided, then delete the registry key to stop this
echo behaviour.
由于%0
的使用,您可以任意命名它(带有.cmd
或.bat
扩展),而且它仍将按预期工作。
https://stackoverflow.com/questions/6677161
复制相似问题