I've been trying to write a macro do do the equivalent of
- Hitting Ctrl+Alt+E to bring up the Exceptions window
- Toggling the textbox in the 'thrown' column for 'Common Language Runtime Exceptions'
- Hitting OK
If I record this, it records only a single line of macro code which doesn't do anything. Anyone know how to do this?
From stackoverflow
-
It's late and I haven't tested it, but does this help?
Dim dbg As EnvDTE90.Debugger3 = DTE.Debugger Dim exSettings As EnvDTE90.ExceptionSettings = dbg.ExceptionGroups.Item("Common Language Runtime Exceptions") Dim exSetting As EnvDTE90.ExceptionSetting = exSettings.Item("System.Data") If exSetting.BreakWhenThrown Then exSettings.SetBreakWhenThrown(False, exSetting) Else exSettings.SetBreakWhenThrown(True, exSetting) End Ifmcintyre321 : It almost works. With a bit of tinkering I'm sure it would. ta! -
A similar question was posted and answered here. It works for all CLR exceptions and takes ~1.5s to execute.
mcintyre321 : thanks. man i wish i'd got 12 upvotes!
0 comments:
Post a Comment