views:

382

answers:

3

I don't understand this at all, but I can no longer see any locals or ivars when debugging my iPhone app with Xcode 3.2.3. Everything seemed normal until yesterday afternoon, and now I just see the globals and registers, which are not of much interest to me.

HAs anyone else had this experience? I feel like I have gone crazy. How can the debugger "forget" to show me variables? Its the debug build, non-optimized code generation, breakpoints work, where are the variables?

I am so sorry I upgraded to Xcode 3.2.3. What a mistake that was. I am so not impressed.

Oh, yeah, I built a template app just to see if THAT one would debug normally and it does, so I am looking at the differences in the project settings to see if that holds a clue.

A: 

Close the project, open Terminal, cd into the <project>.xcodeproj directory, delete all <username>.* files (i.e. delete everything except project.pbxproj), then try opening your project again.

(Note: don't worry about the files you are deleting - they are just per-user setting files for things like window positions, saved breakpoints, etc - the important stuff is all in project.pbxproj.)

One other thing that has also solved problems for me in the past is to trash the entire build folder.

Paul R
Yeah, I tried that (via the Finder, but same idea). I set three breakpoints at various points in the code. The first two I get to, I see locals/self/arguments. When I get to the last (the deepest into the app), all I see are the globals/registers. There is a local var right there in the code, and its value has been printed out to the console via a NSLog call, but the debugger does not show it. Another odd thing is that Xcode no longer seems to have tooltips for the variables. Anyone notice that?
Paul
Try deleting the build folder too - that can sometimes clear problems that a "clean" doesn't fix.
Paul R
Did that too.After much head scratching, I am thinking that something is seriously wrong with my code. If I set a breakpoint early in the lifecycle of the app, I see the vars. Its only farther along that lifecycle that the vars disappear, and now I am finding that very soon thereafter the app crashes. So, What I am thinking now is that I have some major stack corruption going on, and that I need to deal with that.
Paul
@Paul: yes, that makes sense - if your stack is hosed then that may well confuse gdb.
Paul R
A: 

I just had the same problem and it turned out to be which compiler I had set in the project settings. Switched it to GCC 4.2 and they started showing up again.

Rob
A: 

I upgraded from Xcode 3.2.3 to 3.2.4 and changed the SDK version to 4.1 and this problem went away. Other work arounds didn't work for me.

Rn222