Visual Studio cannot debug managed applications because a kernel debugger is enabled on the system.

less than 1 minute read

I developed some awesome features for my SharePoint environment and to my Surprise they weren’t working that well.

So I thought lets attach it to the debugger and take a look what is going wrong. When I attached the debugger I got the following error message:

“Visual Studio cannot debug managed applications because a kernel debugger is enabled on the system.”

After a couple of hours investigating the problem I found a strange behavior on the start up of my development machine it was starting up in some kind of debug mode. To check if you machine is running in debug mode do the following:

  1. Start – Run – msconfig
  2. Select the boot tab and click on advanced options.
  3. If the debug check box is marked it is running in a debug mode.

image

Unmark the checkbox and you will be able to debug your code.