The Exceptions Dialog

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