什么是 Xcode 中的异常断点 [英] What is an exception breakpoint in Xcode
问题描述
已经有关于如何在 Xcode 中使用异常断点的帖子.但我的问题是那究竟是什么?当我为所有异常启用异常断点时,似乎我得到了一个非常完整的堆栈跟踪.为什么会这样?此外,我不再收到错误消息.我真的很好奇异常断点是如何工作的.谢谢
There have been posts about how to use exception breakpoint in Xcode. But my question is what exactly that is? It seems that I get a much complete stack trace when I enable exception breakpoint for all exceptions. Why is that so? Also I don't get error messages anymore. I am just really curious about how exception break points work. Thanks
推荐答案
它只是在 objc_exception_throw
上设置符号断点的 GUI 包装器.
It's just a GUI wrapper around setting a symbolic breakpoint on objc_exception_throw
.
objc_exception_throw
只是一个用于引发所有异常的 C 函数.所以这就像破坏任何功能一样.
objc_exception_throw
is just a C function that is used to raise all exceptions. So it's just like breaking on any function.
您不会再收到日志消息,因为在抛出异常时调试器会停止.如果您从那里继续,异常最终将由默认记录它的应用程序处理.但是,如果您不继续,您将不会收到任何日志.
You don't get log messages any more because the debugger stops when the exception is thrown. If you continue from there, the exception will eventually be handled by the application which logs it by default. If you don't continue, though, you won't get any logs.
这篇关于什么是 Xcode 中的异常断点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!