Why would Xcode 4 not be breaking on exceptions?

半城伤御伤魂 提交于 2020-01-02 07:27:14

问题


Just recently Xcode 4 has stopped breaking on exceptions. Every exception causes the debugger to stop at UIApplicationMain with no stack trace.

  • I have a breakpoint set on objc_exception_throw (confirmed by GDB logs)
  • Breakpoints are turned on (confirmed by GDB and other breakpoints work fine)
  • LLVM GCC 4.2 is my compiler
  • Enable Objective-C Exceptions is turned on

Are there any reasons breakpoints may not be working? Any flags I'm missing?


回答1:


In Xcode 4, you add the breakpoint for exceptions via breakpoint tab in the left (hit Apple+6). You add the new exception with the little plus in the bottom left.

See: "Run > Stop on Objective-C exception" in Xcode 4?

For more instructions.




回答2:


It didn't work in XCode 4.2 for me. I solved my issue with specifying a sort of the exception as All C++ exceptions. Debugger is GDB.



来源:https://stackoverflow.com/questions/6285603/why-would-xcode-4-not-be-breaking-on-exceptions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!