Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XCode 4 iOS - Debugger shows bytecode instead of telling me what line my app crashed

When my app crashes, instead of seeing what line caused, I see a window that prints all unreadable byte code. I used to be able to see what line it crashed on, but I must have changed something. Here's a screen shot: Screenshot

What setting can I change to have XCode show me where my app crashed?

like image 833
D-Nice Avatar asked Nov 11 '11 09:11

D-Nice


2 Answers

UNcheck the "Show Disassembly When Debugging" menu option:

disassembly



The inverse of the above; if you want to show disassembly for the current debug location, you can use this drop-down menu:

disassembly2

like image 107
chown Avatar answered Sep 30 '22 08:09

chown


The actual crash may not necessarily be in your code. The debugger is going to point you to the machine instruction that caused the crash. It may be in a cocoa-touch method or OS call which crashed because of a bad parameter you passed in (an invalid pointer is a common culprit).

Because the debugger does not have access to the source for the code that actually crashed, it will show you the disassembled machine code. What you need to do is follow the call stack backwards until you reach your code. That should point you to the line of code in your app which (indirectly) caused the crash.

like image 36
Ferruccio Avatar answered Sep 30 '22 07:09

Ferruccio