Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode debugger stopped displaying local and self variables

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.

like image 426
Paul Avatar asked Jul 23 '10 20:07

Paul


2 Answers

In my cases it was the optimisation for debug.

In the build settings Optimization Level was set to Fastest for both Debug and Release. I switched Debug to None and it solved the issue.

enter image description here

like image 105
Tibidabo Avatar answered Oct 15 '22 18:10

Tibidabo


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.

like image 34
Paul R Avatar answered Oct 15 '22 18:10

Paul R