代码之家  ›  专栏  ›  技术社区  ›  Drew Noakes

SharpDevelop equivalent of Visual Studio's “Break on exceptions”

  •  2
  • Drew Noakes  · 技术社区  · 14 年前

    In Visual Studio, there's a debugger setting labelled "Break on exceptions" or something like that. It drops into the debugger whenever an exception is raised (that is, on the first pass of the two pass exception mechanics), regardless of whether the exception will be handled or not.

    这是一个非常有用的特性,当在调试器中运行时,我会一直保持它的开启状态,因为我更喜欢从不引发任何异常。

    我在SharpDevelop中找不到相同的设置。知道它是否在那里吗?如果没有,为什么不呢?

    2 回复  |  直到 9 年前
        1
  •  3
  •   Jesse Chisholm    9 年前

    在SD v4中,他们在“调试/常规”部分的“工具/选项”对话框中添加了“处理异常时暂停”复选框。

    This will help you achieve your goal of never have any exceptions raised . ( as long as .NET doesn't choose to use Exception handling as a form of code-flow-control. )

    update :在sd v5中,他们添加了选择抛出时要捕获哪些异常的能力,无论是否处理。

    然后您可以输入您感兴趣捕获的特定异常的类名。如果您不再对该类型的异常感兴趣,可以随时回来取消选中该条目。

    enter image description here

    SD v4 - Tools / Options / Debugging

    This will help you achieve your goal of never have any exceptions raised . ( as long as .NET doesn't choose to use Exception handling as a form of code-flow-control. )

    更新

    SD v5 - Tools / Options / Debugging

    And then you can enter the class name of the specific Exception you are interested in catching. At any time you can come back and uncheck the entry if you are no longer interested in that type of exception.

    enter image description here

        2
  •  2
  •   Community THelper    7 年前

    嗯,我想不是:

    http://bugtracker.sharpdevelop.net/issue/ViewIssue.aspx?id=1511&PROJID=4

    不过,我想知道这不在里面是否有一个很好的理由。很难实施吗?

    This feature was added in SharpDevelop 4.0. 见 Jesse's answer .