Xcode debugger stopped displaying local and self v

2020-03-13 08:52发布

问题:

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.

回答1:

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.



回答2:

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.



回答3:

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.



回答4:

In my build settings Optimization Level was set to None then also having same issue, For me it resoloved by following step:

1-) select your target near run button on xcode where you select device and simulators.

2-) then go to edit scheme of selected target.

3-) now check in run section that Build Configuration is set to Debug

4-) now check in archive section that Build Configuration is set to Release

in my case archive section was set to Debug, i changed it to release and its works.

refer screenshot: https://i.stack.imgur.com/J6nGI.png



回答5:

With Xcode 7.1 appeared the same problem, while I'm not sure, if it really was the update, because I changed the Architecture also to "Universal (32/64bit)" and Valid Architectures to "x86_64 i386" in the Project->Build settings.

Anyway, I checked all advices I could find, but my settings were correct.

Changing the Product->Destination from 32 bit to 64 bit solved. I could also recreate the problem by switching from 64 bit to 32 bit.



回答6:

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.