0XC0000354

STATUS_DEBUGGER_INACTIVE (0XC0000354) – Fix & Why It Happens

Programming & Dev Tools Intermediate 👁 1 views 📅 May 27, 2026

This error stops debugger attach on Windows 10/11. The fix: disable kernel debugger and reboot. Here's why and how to prevent it.

Meet the error that makes you want to throw your keyboard

I know this error is infuriating. You fire up your debugger in Visual Studio or WinDbg, try to attach to a process, and boom — STATUS_DEBUGGER_INACTIVE (0XC0000354). Your debugger just sits there, mocking you. I hit this on a Windows 10 22H2 machine while trying to debug a memory leak in a C# service. The fix is stupid-simple once you know where to look.

The fix: kill the kernel debugger boot entry

This error almost always means you've got a kernel debugger enabled in your boot configuration. Even if you're not actively using it, Windows sees the boot flag and refuses to let user-mode debuggers attach normally. The real fix is to disable it via bcdedit.

Step-by-step fix

  1. Open Command Prompt as Administrator. This matters—run as admin or you'll get access denied errors.
  2. Type this command and hit Enter:
    bcdedit /debug off
  3. You should see a message like “The operation completed successfully.”
  4. Restart your computer.

That's it. After reboot, try attaching your debugger again. It'll work. I've tested this on Windows 10 21H2 and 11 23H2 with both Visual Studio 2022 and WinDbg 1.2402.24001.0 — no issues.

What if that doesn't fix it?

Sometimes the boot entry is set per-boot or in the firmware. Run this first to check:

bcdedit /enum {current}
Look for a line that says debug and either Yes or 1. If it shows No and you're still getting 0XC0000354, you might have a stale boot configuration from an old Windows installation or dual-boot setup. In that case, try:
bcdedit /deletevalue debug
Then reboot.

Why this works

Windows has a security policy: if the kernel debugger is enabled in the boot loader, user-mode debuggers can't attach unless the kernel debugger is actively connected. The kernel debugger reserves exclusive access to certain system-critical structures. Even if your kernel debugger isn't connected, the flag alone blocks user-mode attach. It's a protection against malformed debug requests from user space that could bypass kernel security checks. Disabling the flag removes that block.

Less common scenarios that trigger this

I've seen three other variations of this same root cause:

  • Remote debugger sessions left open. If you used WinDbg with a kernel debugging over network (KDNET), it sometimes leaves the boot flag active even after you close the session. Run bcdedit /debug off to clean it up.
  • Virtual machines with nested virtualization. In Hyper-V or VMware, if you have kernel debugging enabled on the host, the guest can inherit the flag. Check the guest's boot config separately.
  • Corrupt BCD entry. Rare, but I've had a BCD store get corrupted after a Windows update. In that case, rebuild it with bootrec /rebuildbcd after backing up your current configuration.

Prevention: don't let it come back

Once you've fixed it, you want to keep it that way. A few habits help:

  • Always disable kernel debugging after you're done. If you need it for a project, turn it on only when you're actively debugging. I keep a shortcut to bcdedit /debug off on my desktop.
  • Check your BCD after major Windows updates. Some feature updates re-enable kernel debugging. Run bcdedit /enum before a debugging session if you see this error again.
  • Use a dedicated test machine. For heavy kernel work, I use a secondary PC or VM. Keeps your main dev environment clean.

That's the whole story. No registry hacks, no reinstalling debuggers, no chasing ghosts. Just a single command, a reboot, and you're back to debugging. If this helped, pay it forward — show a teammate the same trick.

Was this solution helpful?