Article ID: 303067 - Last Review: March 10, 2006 - Revision: 4.2

You cannot debug a managed application in Visual Studio .NET if Windows was started in debug mode

This article was previously published under Q303067
Expand all | Collapse all

SYMPTOMS

When you try to debug a managed application (one that makes use of the .NET Framework) with Visual Studio .NET software, you may receive the following error message:
Error while trying to run project: Unable to start debugging.

Unable to start program your project name

Debugging isn't possible because a kernel debugger is enabled on the system.
-or-
The debugger is not properly installed. Run setup to install or repair the debugger.
NOTE: The second error message may have other causes and resolutions.

CAUSE

This problem happens if Windows was started in debug mode on the system. This stops the Visual Studio .NET debugger from debugging managed applications.

To determine whether your system was started in debug mode, see the following Microsoft Knowledge Base article:
244876  (http://support.microsoft.com/kb/244876/ ) How to determine if Windows is started in Debug mode

RESOLUTION

There are two ways that you can resolve this problem. Do either of the following:
  • Resolution 1
    1. Right-click the Project Name in Solution Explorer, and then click Properties.
    2. In the left pane of Properties, click to select Configuration Properties.
    3. Click to select Debugging.
    4. In the right pane, click to select the Unmanaged code debugging check box.
  • Resolution 2
    1. In Microsoft Notepad, open Boot.ini, which is located in the System Drive folder (usually C:\). This file may be hidden and read-only, so you may have to use dir /ASH to find it.
    2. Remove all of the following switches, if found in the file:
      • /debug
      • /debugport
      • /baudrate

    3. Restart the computer, start Visual Studio .NET, and then debug.

REFERENCES

For more information, click the following article number to view the article in the Microsoft Knowledge Base:
170756  (http://support.microsoft.com/kb/170756/ ) Available switch options for Windows NT Boot.ini file

APPLIES TO
  • Microsoft Visual Studio .NET 2002 Professional Edition, when used with:
    • Microsoft Windows 2000 Standard Edition
    • the operating system: Microsoft Windows XP
    • Microsoft Windows NT 4.0
  • Microsoft .NET Framework Software Development Kit 1.0 Service Pack 2
Keywords: 
kberrmsg kbbug kbide kbdebug kbprb kbvs2002sp1sweep KB303067
 

Article Translations