Microsoft KB Archive/893661

= How to debug error messages and hang conditions in the Visual Studio .NET IDE =

Article ID: 893661

Article Last Modified on 7/29/2005

-

APPLIES TO


 * Microsoft ASP.NET 1.0
 * Microsoft ASP.NET 1.1

-



How to debug error messages and hang conditions in the Microsoft Visual Studio .NET IDE
''To customize this column to your needs, we want to invite you to submit your ideas about topics that interest you and issues that you want to see addressed in future Knowledge Base articles and Support Voice columns. You can submit your ideas and feedback using the Ask For It form. There's also a link to the form at the bottom of this column.''



Introduction
Welcome back to another month of the ASP.NET Support Voice column! This month, I am going to show you how to use the Visual Studio debugger to troubleshoot hang conditions or unclear error messages that you may receive in the Visual Studio .NET Integrated Development Environment (IDE).

My name is Adam Semel, and like many previous authors of this column, I support ASP.NET here at Microsoft. I have to think about when I started supporting ASP.NET. It feels like just a few months ago, and yet it's much closer to two years. To me, supporting ASP.NET has been a daily crossword puzzle that I can't wait to do every day.

Answer 1 Across
1. How can we troubleshoot hang conditions in the Visual Studio .NET IDE?

Answer: Use the Visual Studio .NET IDE!

Sounds crazy, right? It's not. It's actually pretty simple, and here is how we do it:

Say that you are receiving an error message when you open a Web project, but the error message doesn't tell you exactly what went wrong! Maybe when you open an existing Web project, Visual Studio .NET 2002 or 2003 is extremely slow or just stops responding (hangs).

Open another instance of Visual Studio .NET. On the Tools menu, click Debug Processes.

Find the process for Visual Studio (Devenv.exe). Notice that the application that is open in the Devenv.exe process also appears.



Click this process, and then click Attach.

Click OK on the next screen to enable the common language runtime.



Now we must tell the debugger to break on all CLR exceptions. To do this, click Exceptions on the Debug menu. Click Common Language Runtime Exceptions, and then click Break into the debugger. Click OK.



Now reopen or re-create the problem that you experienced in Visual Studio .NET, and then look at what the debugger breaks on. If you do this, you will receive more information about the issue that you are experiencing in the Visual Studio .NET IDE. The Visual Studio .NET IDE often masks the true error messages to be friendly. Or, if the Visual Studio .NET IDE is stuck in a loop, the Visual Studio .NET IDE may not display the true error message at all.

I hope this helps get to the root cause of those difficult Visual Studio .NET IDE problems that we sometimes experience in Visual Studio .NET. Play around with the Visual Studio .NET debugger. Sometimes you can stumble upon answers to questions that you are stuck on!



As always, feel free to submit ideas on topics you want addressed in future columns or in the Knowledge Base using the Ask For It form.

Keywords: kbhowto kbgraphxlink kbasp KB893661

-

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

© Microsoft Corporation. All rights reserved.