Microsoft KB Archive/320349

= FIX: The Visual Studio .NET Debugger may stop responding if a method that is invoked through the immediate window quits the program =

Article ID: 320349

Article Last Modified on 8/25/2005

-

APPLIES TO


 * The Integrated Debugger, when used with:
 * Microsoft Visual Studio .NET 2002 Professional Edition

-



This article was previously published under Q320349



SYMPTOMS
Visual Studio .Net Debugger may stop responding (hang) if a method that is invoked through the immediate window quits the program. This only occurs if a breakpoint is set when the program quits.



RESOLUTION
To work around this problem, either avoid invoking methods from the immediate window that quits the program, or make sure to remove all of the breakpoints in the debugger.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. This bug was corrected in Microsoft Visual Studio .NET (2003), Professional Edition.



Steps to Reproduce the Problem
 Create a new Visual C# Console application.  Replace Class1.cs with the following code: using System; namespace ConsoleApplication1 {

class Class1 {

public static void Main(string[] args) {           CheckVal(1);

}       public static void CheckVal(int i)        { if (i<0) Environment.Exit(-1); else return; }   } }

 Put a break-point at the CheckVal(1)line in Main function and run(F5). When the break-point is hit, type CheckValue(-1) in the immediate window, and then press ENTER. The program and the debugger stop responding.</ol>

Keywords: kbbug kbfix kbenv kbpending kbvs2002sp1sweep KB320349

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.