Microsoft Knowledge Base Email Alertz

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:

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

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

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://kbalertz.com/Feedback.aspx?kbNumber=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://kbalertz.com/Feedback.aspx?kbNumber=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
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate