How do I find out what exception was thrown in the Xcode debugger (for iPhone)?

前端 未结 4 885
伪装坚强ぢ
伪装坚强ぢ 2020-12-12 14:45

I\'m learning iPhone programming from Erica Sadun\'s The iPhone Developer\'s Cookbook. When I run the app I created by following the steps in the Temperature Conversion Exa

4条回答
  •  执念已碎
    2020-12-12 15:12

    In the new Xcode (at least starting from v4.5), you can catch all exceptions easily by doing this:

    1. Bring up breakpoint navigator (⌘6)
    2. Click + on the bottom left
    3. Add Exception Breakpoint

    I think the above is the same as a breakpoint on objc_exception_throw. http://samwize.com/2012/09/26/xcode-4-dot-5-tips-and-tricks/

提交回复
热议问题