Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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


View products that this article applies to.

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!

↑ Back to the top


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.

↑ Back to the top


Keywords: KB893661, kbasp, kbhowto, kbgraphxlink

↑ Back to the top

Article Info
Article ID : 893661
Revision : 4
Created on : 7/29/2005
Published on : 7/29/2005
Exists online : False
Views : 306