February 23rd, 2015
In Visual Studio 2015 we’re pleased to introduce the new Exception Settings tool window for configuring the debugger’s exception settings. In this post I will walk you through the features of this new window. For more information on exception classifications in Visual Studio, see Understanding Exceptions while Debugging with Visual Studio.
modal, slow-opening, hard-to-search Exceptions Dialog. We heard all of your feedback, so we built an improved Exception Settings window. We have taken all of the useful functionality of that old dialog and put it into this convenient and easy to use tool window.
Enabling Exceptions to Break When Thrown The Exception Settings window contains a list of the default exceptions provided by Visual Studio. These exceptions are grouped into categories that correspond to the different
debug engines you might use. Checking a checkbox next to an exception means that you are instructing the debugger to break execution when that exception is thrown. When a box is unchecked or an exception is not in the list, the debugger will only break execution when that exception type is unhandled.
- Filter – Show only checked exceptions. You can use this filter to see what exceptions you have enabled to Break when Thrown. If you have a set of exceptions that you need to temporarily disable, this filter provides an easy way to do that.
Using the Context Menu You can also add, remove, and reset the list as described above by using the context menu. Additionally, you can enable certain exceptions to “Continue when unhandled in user code” by selecting this option from the context menu. [This is the same setting that was toggled from a second column of check boxes in the old modal dialog.] This option is currently only supported for debugging Managed or JavaScript applications with
Just My Code enabled. You can view which exception types have this option enable by showing the Additional Actions Column under “Show Columns”. If you have Just My Code disabled you will not see these two context menu items because they do not apply.
Important Notes
- This new window contains all of the same functionality as the old modal dialog. No capabilities of the debugger have changed only the way you can access them
- The debugger will always break when an exception is unhandled
- The setting to change if the debugger breaks on user-unhandled exceptions has moved under a context menu
- The menu location has moved to Debug -> Windows -> Exception Settings
Try It Out! In this post I only described the new and improved UI experience for exception settings; to learn how to take advantage of this window to diagnose bugs in your code, please read my other blog post on
Understanding Exceptions while Debugging with Visual Studio. You can experience the new Exception Settings tool window right now by installing Visual Studio 2015 CTP6. If you run into issues or have any other feedback you’d like to share about this new window, please let us know in the comments below, through Visual Studio’s Send a Smile feature, or in our MSDN forum.