2

I've been trying to write a macro do do the equivalent of

  1. Hitting Ctrl+Alt+E to bring up the Exceptions window
  2. Toggling the textbox in the 'thrown' column for 'Common Language Runtime Exceptions'
  3. 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?

mcintyre321
  • 12,996
  • 8
  • 66
  • 103

1 Answers1

-1

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 If
Martin
  • 39,569
  • 20
  • 99
  • 130