Why I am right!

May 22, 2008

Debugging "caught" Exceptions

Filed under: Debugging, Microsoft, Technology, Visual Studio — Shaun @ 10:05 pm

For the past week or so I noticed a few strange entries in the Visual Studio “Output” window when debugging to a certain page of our app.

Overflow

Something on my page is throwing and catching an OverflowException. Now it probably didn’t matter what was causing this exception because the application was working fine but sometimes things like this bother me enough that I have to figure it out. Luckily there is an easy way to debug ANY exception that you see in that window. I found the solution here.

Once I setup Visual Studio to catch all exceptions of type System.OverflowException (by following the steps in the linked article) the debugger popped the following window anytime that exception was thrown.

  Overflow

From here I was able to follow the stack trace to debug the actual problem which was an Integer getting set incorrectly in a grid we use.

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: