简体   繁体   中英

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.

替代文字

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM