When Does This Error Hit?
You're deep in a debugging session — maybe Visual Studio 2022, WinDbg, or even an older GDB setup on Windows — and you hit Ctrl+C to stop some runaway code from running wild. Or you accidentally mashed the pause/break key on your keyboard while stepping through assembly. Suddenly, instead of a clean break, you get the ERROR_DBG_CONTROL_BREAK (0x000002B8). The debugger freezes, the output window goes dark, and you're staring at a dialog that says "Debugger received control break." Had a client last month who spent an hour chasing a phantom bug in a .NET service, only to realize every time he hit Ctrl+C to stop the debugger from a console app, it triggered this exact error. He was interrupting the debugger itself, not his code.
What Actually Causes It
The root cause is simple: you sent a CTRL_BREAK_EVENT or CTRL_C_EVENT to the process that's hosting the debugger, not the target process. In Windows, when you press Ctrl+C in a console window, it sends a signal to the foreground process. If that process is a debugger (like devenv.exe, windbg.exe, or cdb.exe), the debugger's own handler catches it. The debugger sees that signal as "I need to break into the debugger right now!" But because the debugger is already in the middle of handling your command, it throws 0x000002B8 instead of gracefully pausing. This is especially common if you're running your debugger in a separate console window (like with GDB on Windows via Cygwin or MSYS2) and the keyboard shortcut gets intercepted by the wrong layer. Another trigger: using SetConsoleCtrlHandler in your own code and then pressing Ctrl+C while a debugger is attached — that handler can clobber the debugger's own handler.
The Fix: Stop Interrupting the Debugger
You don't need a registry hack or a service restart. You need to change how you're sending that interrupt. Here's the step-by-step that works every time.
- Use the debugger's built-in break, not Ctrl+C. In Visual Studio, press Ctrl+Alt+Break (that's the pause/break key on most keyboards: Pause/Break). In WinDbg, use Ctrl+Break or Ctrl+Z depending on build. In GDB on Windows, use Ctrl+C only if you're in the GDB console itself — not in a separate terminal running your program. Map your keyboard shortcuts to avoid the clash.
- If you're in a console window and need Ctrl+C for your app, use a different terminal. Open Command Prompt or PowerShell, run your app there, and attach the debugger from Visual Studio via Debug > Attach to Process. Then any Ctrl+C goes to your app's console, not the debugger's. This is how you handle async debugging of services or long-running console apps — I do this daily with Python scripts that need a clean break.
- Disable the debugger's console control handler (advanced). If you're writing a custom debugger or using an older one, you can call
SetConsoleCtrlHandler(NULL, TRUE)in the debugger's startup to ignore all control signals. But you'll lose the ability to break into the debugger that way. I don't recommend it unless you're building your own tool. Instead, just remap your keys. - If using WinDbg, configure your interrupt key. In the WinDbg command window, type
.interruptto manually break — that's the command equivalent. To avoid the issue entirely, set your keyboard shortcuts so Ctrl+C in WinDbg doesn't send the signal. Go to Edit > Preferences, uncheck "Enable Ctrl+C as break" under the Debugger tab. Then use Ctrl+Break instead. - On older Windows (7, 8, or early Windows 10 builds), you might need to update your debugger. I've seen this error more in Visual Studio 2015 and 2017 with WinDbg 10.0. The fix then was to install WinDbg Preview from the Microsoft Store, which handles signals differently.
Still Seeing 0x000002B8?
If you're still hitting this after changing your keyboard habits, check if you have a global hotkey tool like AutoHotkey or SharpKeys intercepting your Ctrl+C and sending it to the wrong process. Had a client using AutoHotkey to remap Ctrl+C for copy — it was sending the keystroke to the debugger's console, not the target app. Turn off any such scripts temporarily and test.
Also verify you're not running the debugger as Administrator while your target app is in a user-level console — that mismatch can cause the control event to get lost or double-interpreted, triggering the error. Run both at the same privilege level.
Finally, if you're using a remote debugger (like Visual Studio Remote Debugger), the signal comes from the remote machine, and the routing can be finicky. Stick to local debugging unless you need remote, then use the debugger's Break All command instead of Ctrl+C. That's saved me hours on remote customer sites.
Bottom line: Don't hit Ctrl+C in the debugger's console. Use the proper break command. Your debugging session will thank you.