I currently use the Debug -> Exceptions dialog to stop VS from breaking for certain exceptions types. This works perfectly. The problem comes in that occasionally I would like to debug those exceptions, or accidentally turn all exceptions on or off, I then have to hunt through the list and disable the specific exceptions from scratch.
Is there a way to do this with a script of some sort? So that I can add whichever options to a list and toggle then on or off easily?
You can write a macro that uses the EnvDTE.Debugger3 interface. This sample one turns on the break for a NullReferenceException, written out to make the intermediate steps obvious:
To turn it off, pass False as the first argument.