次の方法で共有


Debugger.Launch() not displaying JIT debugger selection popup on Windows 8/8.1

If executing an instruction such as Debugger.Launch() inside a Windows Service (session 0 process) is not causing the display of the JIT debugger selection popup even if Visual Studio is indeed installed on your machine, it might be due to the current value of the registry key for the Visual Studio JIT debugger. To this end it might solve running the following from a command prompt (run it as an administrator on Windows 8/8.1):

reg add "HKCR\AppID\{E62A7A31-6025-408E-87F6-81AEB0DC9347}" /v AppIDFlags /t REG_DWORD /d 8 /f

For full details read the following blog post:

https://blogs.msdn.com/b/dsvc/archive/2012/12/30/jit-debugging-using-visual-studio-may-fail-when-trying-to-debug-a-session-0-process-on-windows-8.aspx

Also make sure your JIT settings in Visual Studio are correct:

https://msdn.microsoft.com/en-us/library/5hs4b7a6.aspx