Search code examples
iosxcodexcode4

Why does Xcode 4.2 not show values of variables in debug mode when hovering over them?


Xcode 3.2 showed me the values of variables. Now in Xcode 4.2 when I debug and it stopped in a scope, I can't see the values of variables anymore. The variables view on the lower left side contains almost nothing useful except the memory adress of an object. When I click the expand-arrow nothing appears there. It's empty.

Must I setup something to make the debugger work properly?


Solution

  • Xcode 4 is very finicky with variables in the debug window. You'll probably find that locally defined primitives (ints, floats, strings, etc) will display but nothing else will.

    I know its not much help but I usually just add an 'NSLog()' and print the variables I am trying to debug. Not as convenient but it gets the job done.

    If anyone else knows a permanent fix id also be grateful.