Objective-C stack trace

前端 未结 1 1937
独厮守ぢ
独厮守ぢ 2020-12-05 11:37

After using a NSAssert() that throws a NSInternalInconsistencyException exception in an Objective-C application running on an iPad device (compiled

相关标签:
1条回答
  • 2020-12-05 11:56

    A couple of useful things:

    1. If you're running your app out of Xcode, add an exception breakpoint. In the breakpoint navigator (command-6) hit the '+' at the very bottom left to add. This will pause execution on the line that throws the exception and allow you to inspect the current scope, stack, etc.

    2. If you're using gdb, use bt to print the backtrace

    3. If you're using lldb, use thread backtrace instead

    0 讨论(0)
提交回复
热议问题