kd.exe -kl

The system does not support local kernel debugging

If you’re trying to do some local kernel debugging with one of Windows Debugging Tools’ debuggers and Windows isn’t booted into debug mode you’ll get a message like one of the following (all commands run from an elevated command prompt):

kd -kl

Microsoft (R) Windows Debugger Version 10.0.15063.400 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.

The system does not support local kernel debugging.
Local kernel debugging requires Administrative privileges.
Only a single local kernel debugging session can run at a time.
Local kernel debugging is disabled by default. You must run “bcdedit -debug on” and reboot to enable it.
Debuggee initialization failed, HRESULT 0x80004001
Not implemented

windbg -kl

—————————
WinDbg:10.0.15063.400 AMD64
—————————
The system does not support local kernel debugging.

Local kernel debugging requires Administrative
privileges, and is not supported by WOW64.
Only a single local kernel debugging session can run at a time.
Local kernel debugging is disabled by default. You must run ‘bcdedit -debug on’ and reboot to enable it.
—————————
OK
—————————

You can enable Windows debug mode by using…

bcdedit.exe -debug on

 or msconfig.exe, but if you have BitLocker enabled for your OS drive, you’ll have to have to enter the recovery key or recovery password.

Here’s the message from msconfig.exe:

—————————
System Configuration
—————————
BitLocker Drive Encryption is enabled on your OS drive. Because these changes modify the machine’s boot settings, the machine will enter recovery mode at next boot and you will need to provide a BitLocker recovery key or recovery password. Are you sure you want to proceed?
—————————
Yes No
—————————

Depending on what you’re up to, that’s just too much of a hassle. Fortunately there’s a tool from Sysinternals that removes the need of booting Windows into debug mode: livekd.

By default, livekd will run kd.exe, but you can tell it to run WinDbg by passing the -w option:

livekd -w

Several other options can be set when running livekd (see the link above for details). The ones it doesn’t understand are passed on to the chosen debugger.

Important to note that the feature set of the debugger when running through livekd is not the same as when running without it. See the docs for more information.

 

 

 

Published by

Alfred Myers

I have been interested in computers since I got my hands on a magazine about digital electronics back in 1983 and programming them has been paying the bills since 1991. Having focused on Microsoft-centric technology stacks for the best part of two decades, in recent years I’ve been educating myself on open source technologies such as Linux, networking and the open web platform.