Aviram Netanel Aviram Netanel - 1 month ago 7
iOS Question

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:


  • I tried to restart my mac - didn't help.

  • my Xcode version: 6.4



going in an if statement will nil argument

Answer

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".