Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio enable debug exceptions through macro

In Visual Studio I would like to break on certain exception while in debug mode. This is configured through the "Debug >> Exceptions" dialog window (see image below). Can enabling and disabling these checkboxes be controlled through a macro? I would like to add a button to a toolbar to control the enable/disable of these with just one click.

alt text

like image 205
Aaron Hoffman Avatar asked Nov 23 '10 22:11

Aaron Hoffman


1 Answers

Yes, you can use a macro to toggle exceptions on or off by using the ExceptionSettings class. The problem seems to be that using the macro is really slow. The following links has code to get you started with this.

Customizing Exception Handling in the VS Debugger - John Robbins' Blog
Fixing Debug > Exceptions settings programmatically - code.logos.com

like image 115
Jorriss Avatar answered Sep 19 '22 15:09

Jorriss