Aviram Netanel
Aviram Netanel

Reputation: 13675

Xcode debug inspector shows values as nil

I'm having a very weird problem - as you can see in the picture below, the debug shows that the program entered to the if statement, but the value of color is shown as nil !!!

obviously that's can't be true, and I suspect that the Xcode is showing incorrect values on the inspector \ variable view (at the debug area).

I have no idea - maybe my Xcode had too much vodka?

any HELP please???

updates:

going in an if statement will nil argument

Upvotes: 6

Views: 5430

Answers (2)

Frank Schmitt
Frank Schmitt

Reputation: 25785

I've seen the "extracting data from value failed" message (when doing a po foo at the LLDB prompt), even on debug builds . This appears to be an LLDB bug.

A workaround that worked for me was to cast the value to the expected return type (e.g. if it's an NSNumber, po (NSNumber *)foo).

Upvotes: 22

nivbp
nivbp

Reputation: 465

Check your scheme - Run tab on the left should have the Debug executable option checked.

If you are running on AdHoc \ Release mode, the debugger will not show the right values.

Change the "Build Configuration" to "Debug".

Upvotes: 5

Related Questions