How to track the exact crash issue in iOS

When I debugged my iPhone application, I received an error message and the application turned out to be broken. I added an exception breakpoint, but did not specify where in the code, and crashed at main.m.

Here I add a screenshot of the Xcode window when the application crashed.

enter image description here How can I find the exact problem for the crash?

Is it possible? Please, help.

+5
source share
4 answers

Turn on Zoombie so you get a description of the error in the log.

, ( "" " " ), " Foo.app" , "" - . NSZombieEnabled " " YES, Xcode 3.

Xcode 4.1 "" "" " ".

+6

EditScheme XCode. , . " ". .

enter image description here

+6

, , .

+3

, .

First go to the “Exceptions” tab and “Add an Exception Breakpoint” using the + in the lower left corner. enter image description here

Then, when the application crashes, click "0 objc_exception_throw" in the "1" section enter image description here

Finally, in the console, type:

  • register (you should get a list of registers)
  • po $ rax (usually the exception is in 'rax')

    (you should see the exception output on the console)

Hope this helps.

+1
source

All Articles