2

我一直在尝试编写一个宏做相当于

  1. 按 Ctrl+Alt+E 调出异常窗口
  2. 切换“公共语言运行时异常”的“抛出”列中的文本框
  3. 打好

如果我记录这个,它只记录一行不做任何事情的宏代码。有人知道怎么做吗?

4

1 回答 1

-1

已经很晚了,我还没有测试过,但这有帮助吗?

    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
于 2008-12-02T23:03:32.333 回答