如何在所有抛出上设置断点? [英] How to set a breakpoint on all throws?
本文介绍了如何在所有抛出上设置断点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有什么方法可以指定一个断点以停止所有"throw"语句? (符号断点)
Is there any way how we can specify a breakpoint to stop on all 'throw' statements? (symbolic breakpoint)
guard let id = UInt(idString),
let changeset = UInt(changesetString),
let uid = UInt(uidString)
else {
throw OSMVectorMapDescriptionError.ElementAttributeConversionError(element: xmlNode, attributeº: nil)
}
推荐答案
刚刚在Xcode 8.3中找到了一个替代方案:菜单中有一个"Swift Error Breakpoint"选项,用于添加新的临时断点:
Just found an alternative in Xcode 8.3: there is a "Swift Error Breakpoint" option in the menu for adding new ad-hoc breakpoints:
如果右键单击新创建的断点,甚至可以指定要打破的特定Error
符合类型.
If you right-click the newly created breakpoint, you can even specify a particular Error
-conforming type to break on.
这篇关于如何在所有抛出上设置断点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文