Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging Only Obj-C/C in Xcode 4.3?

Now that I've upgraded to Lion and Xcode 4.3.x, the debugger is stepping into the ARC stuff. So I'm seeing a screen full of

libobjc.A.dylib`objc_retainAutoreleasedReturnValue:
0x1de7fe0:  pushl  %ebp

and pushl and movl and subl etc. Unfortunately I cannot symbolicate these, nor do I care to debug Apple's stuff. Is there any way to get the debugger to focus ONLY on code I actually have in my possession?

I'm using LLDB but the same thing happens with GDB.

EDIT: This happens on AppCode too, which says something (but I don't know what).

like image 711
Dan Rosenstark Avatar asked May 07 '12 21:05

Dan Rosenstark


1 Answers

This probably isn't what you want to hear, but as of Xcode 4.5.2 (the current version of Xcode, or at least the most current I have ;), I don't believe it's possible to have the debugger automatically skip over Apple's internal instructions. I don't believe this is related to ARC in particular, but just how the latest version of the debugger is working.

Here's ways I've gotten around this while debugging:

1) You can use the "skip over" button to continue onto the next piece of code (and you may have to do this a few times to get out of Apple's stuff).

2) You can put a breakpoint right before and right after your code that you're debugging. This way, instead of using the skip over button, you can use the "play" button.

like image 69
JRG-Developer Avatar answered Oct 29 '22 07:10

JRG-Developer