dontWatchMyProfile
dontWatchMyProfile

Reputation: 46310

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?

Upvotes: 0

Views: 3333

Answers (2)

chris838
chris838

Reputation: 5178

If you right click in the lower left view you can select "Add Expression" and type the name of the variable.

Why Xcode cannot display this information when hovering over is a mystery to me.

Upvotes: 1

Aron
Aron

Reputation: 554

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.

Upvotes: 1

Related Questions