The Exceptions Dialog

Tips Search

The Exceptions Dialog

  • Comments 4

Keyboard:  CTRL + ALT + E
Menu:  Debug -> Exceptions
Command:  Debug.Exceptions
Versions:  2008,2010
Published:  12/1/2010
Code:  vstipDebug0039

 

Visual Studio will, by default, break only when an exception is not handled by user code.  This can sometimes be problematic as the exception may occur several lines away from where the actual exception originally occurred making it harder to find the problem.  You can configure exceptions to break when they happen rather than when they are unhandled using the Exceptions dialog (CTRL + ALT + E):

image

 

 

The exceptions are divided up into five broad categories.  Also, as you can see, there are two options:  "Thrown" and "User-unhandled".  When you check "Thrown" for any category or individual exception it will break when the exception occurs instead of waiting to see if the user handles the exception.

 

Additionally, you can use the following buttons:

Find - will help you search for a specific exception.

 

Reset All - puts exceptions back to their default settings.

 

Add - allows you to add exceptions not currently in the list.

 

Delete - let's you delete any added exceptions.

 

 

 

NOTE:  If you find the "User-unhandled" option missing from this dialog:

image

 

You need to enable "Just My Code" in Tools -> Options -> Debugging -> General to get it back:

image

  • Unfortunately, no option to save all of the custom exception types that have been configured...

  • This dialog is so slow. I have some code that I need 'thrown' turned on, but obviously not in other parts. So I keep having to toggle.

  • This dialog is so slow. I have some code that I need 'thrown' turned on, but obviously not in other parts. So I keep having to toggle that checkbox. It takes 5s for the dialog to load.

  • I have an issue similar to Ted's.  It would be nice to be able to selectively disable breaking on certain exceptions.

Page 1 of 1 (4 items)
Leave a Comment
  • Please add 4 and 5 and type the answer here:
  • Post