Xcode debug inspector shows values ​​as nil

I have a very strange problem - as you can see in the figure below, debug shows that the program is entered in the if statement, but the color value is displayed as zero !!!

obviously this cannot be true, and I suspect that Xcode is displaying incorrect values ​​in the inspector \ variable view (in the debug area).

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

any help please ???

updates:

  • I tried to restart my mac - it didn’t help.
  • my version of Xcode: 6.4

if statement will have nil argument

+6
source share
2 answers

Check your schema - the Run tab on the left should have the Debug version installed.

If you work in AdHoc \ Release mode, the debugger does not display the correct values.

Change "Assembly Configuration" to "Debug".

+3
source

I saw the message “retrieving data from an error value” (when running po foo at the LLDB prompt) even when building debugging. This seems to be a LLDB bug.

The workaround that worked for me was to assign a value to the expected return type (for example, if it's NSNumber, po (NSNumber *)foo ).

+22
source

All Articles