Reputation: 9493
Environment: Xcode Version 5.0.1 (5A2034a)
Scenario:
1) I've create a simple Apple-supplied iOS project template.
2) I create a local string value with an initial value; plus a local integer variable with value.
3) I did a debug 'po' & 'p' for the object and integer.
Xcode's debugger apparently doesn't see these values.
The following are a couple of snippets of the debugger's environment:
As you can see, the debugger's symbol-generator is ON and the optimization is set to NO (zero).
1) Here's another example.
Note: NSLog() does work.
Notice the 'Turkey' for 'testString' value. Why this value?
'Turkey' was used in ANOTHER project and has no relevance to this one sample project.
It appears that I'm getting variable bleed from some xcode environment peculiar to Xcode 5;
...not found/experienced in Xcode 4.
Okay, this is weird. I've tried the NSLog() and got the values displayed. Then just for kicks I did a 'po' again and got the correct value.
However I still have the 'Turkey' value:
2) Here's a second example.
Starting with a new application from the Apple-supplied view template:
This time, the NSLog() works but again, can't get the 'po' value.
I still haven't figured out the pattern here.
What else can I do?
How can I get my debugger 'po' & 'p' commands to show data?
Or... why am I'm getting inconsistent debugger behavior (Xcode5 appears to work okay; re 'NSLog()')?
Upvotes: 1
Views: 1392
Reputation: 9493
I had this recurrent problem so I tried logging via a different account to find the problem disappeared.
So there's something wrong with my Xcode account; specifically:
So I emptied the Xcode folder found under ~/Library/Developer and restarted Xcode. Apparently the problem(s) is/are solved.
Upvotes: 1