Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSJitDebugger operation attempted is not supported on Windows 8 / Windows Server 2012

We have code that adds Debugger.Launch() and Debugger.Break() on certain condition, and this functionality doesn't seem to work in Windows 8 / Windows Server 2012

In previous versions of Windows this worked just fine, launching a window that would show the Visual Studio Debug dialog.

Is this a new breaking change in Windows8/Windows Server 2012?

like image 934
halivingston Avatar asked Aug 13 '12 18:08

halivingston


2 Answers

There is an open ticket with microsoft connect that contains a temporary workaround for this issue.

Just-In-Time debugging, operation attempted is not supported

From comment below:

Just change HKCR\AppID\{E62A7A31-6025-408E-87F6-81AEB0DC9347}\AppIDFlag from 0x28 to 0x8.

like image 121
bulletshot60 Avatar answered Nov 17 '22 01:11

bulletshot60


This is indeed a change in Windows 8. I couldn't find any public documentation yet (albeit Win8 hasn't yet shipped to customers). However, I'll ask someone on the relevant team to make this information available on MSDN as appropriate.

This is part of Session 0 isolation work that started in Windows Vista.

To go back to Win7/2008R2 settings you need to do the following:

For the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Windows, set the "NoInteractiveServices" value to 0, which is (in Windows 8) defaulted to 1. This allows you to manually start the service that facilitates the visual dialog to you in your session, "Interactive Services Detection" (ui0detect). Without setting this key, the ui0detect service will fail to start with an error such as "Function not supported".

net start ui0detect

Of course, you can choose to make this service start automatically with Windows and always boot into being able to debug Session 0 Processes.

like image 30
mjsabby Avatar answered Nov 17 '22 01:11

mjsabby