iOS how to debug crashes without a stack trace like : [__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array?

前端 未结 2 923
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-31 17:34

I\'m trying to dismiss a modal view controller and am getting the following error:

* Terminating app due to uncaught exception \'NSRangeException\', reason:

相关标签:
2条回答
  • 2020-12-31 17:52

    In Xcode 4 you can set an exception breakpoint in the breakpoint editor. Every time an exception is thrown (or caught depending on how you set it up), your application will pause on the line that threw the exception.

    0 讨论(0)
  • 2020-12-31 18:16

    if you are running in the debugger, then absolutely you should be able to see the actual line that the exception is being thrown on.

    add an exception breakpoint by clicking the breakpoints tab at the top of the left pane, then click the plus sign at the lower left. Add an exception breakpoint.

    enter image description here

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