Enabling Debug mode causes Windows to hang if no Debugger is connected
This article provides a solution to an issue where the Operating System with debug mode enabled may hang if no Debugger is connected.
Applies to: Windows 7 Service Pack 1, Windows Server 2012 R2
Original KB number: 2816225
Symptoms
On a computer that is running Windows 7 or Windows Server 2008 R2, after installing Debugging Tools for Windows, the Operating System with debug mode enabled may hang if an application throws user-mode exception.
Cause
When Debug mode is enabled and the debugger hasn't connected because of the user mode exception, the system will hang waiting for a debugger to intervene from the breakpoint.
Resolution
To resolve this problem, disable Debug mode using one of the following methods:
Using System Configuration settings
- Using keyboard press, Windows Key+R to open Run box.
- Type MSCONFIG and then press Enter.
- Select Boot tab and then select Advanced options.
- Uncheck on the Debug check box.
- Select OK.
- Select Apply and then OK.
- Restart the computer.
Using Command Line Interface
- Open an elevated Command prompt.
- Type the following command and press Enter:
bcdedit -debug off - Restart the computer.
More information
Note
Windows shouldn't be run in Debug mode permanently. Debug mode is enabled for connecting to Kernel Debug using Debuggers like Debugging Tools for Windows (WinDbg) and must be turned off once the purpose is accomplished.
Some Windows 7 systems might be shipped with DEBUG switch enabled, ensure to disable it.
To download Debugging Tools for Windows and more information, see Download the Windows Driver Kit (WDK).
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for