How to turn off Windows kernel debugging at boot time?

Mark D Jackson picture Mark D Jackson · Mar 3, 2011 · Viewed 11.8k times · Source

I have a Vista 32 bit machine which I wanted to enable local kernel debugging on. In WinDbg I selected File/Kernel Debug and selected the Local tab and clicked ok. I got the following message.

The system does not support local kernel debugging. ... Local kernel debugging is disabled by default in Windows Vista, you must run 'bcdedit -debug on' and reboot to enable it.

I naively followed the instructions and opened an elevated command prompt and typed 'bcdedit -debug on' and the rebooted.

However, on reboot the system hangs when it gets to the logon screen - or just after I type in my username and password.

I suspect what is happening is that because a debugger is enabled, user mode exceptions are being triggered in the kernel debugger process and it is waiting for me to enter some input from an attached debugger??

I was hoping to debug on the actual target machine.

My problem is that every time I boot - whatever F8 boot option I choose - it always either hangs or gets so far and then reboots - and then hangs.

Booting in Safe Mode - gets close to the logon screen and then reboots. Same applies for the command line and network boot options. Last known good config - hangs too.

Is there any way to change the boot option before Windows loads so that I can turn off kernel debugging. I have only the one boot config which was, in hindsight, my problem - I should have created a copy of the first boot config for my debug boot option.

Unfortunately the system doesn't have a serial port so I can't attempt to debug through that.

The only option I can think of now is to attempt to connect a debugger from a different machine through a USB port. However, don't I need to configure the target PC to accept a debugger on a USB port or will this just work if I get a proper debug USB cable?

Answer

Oliver picture Oliver · Aug 13, 2012

There is no need for to use the repair option! Just press F10 instead of F8, now you will be able to edit the bootparameter! Just delete /DEBUG and press enter to continue the boot process. After set use bcdedit -debug off to permanently change the debug option.