Search code examples
debuggingvariablesxcode4real-timewatch

How can I track a variable value in realtime in the Xcode 4 Debugger?


I know how to use the Xcode debugger, and I've used po to display values for variables.

The problem I'm having is that I want to see the variable values, and track how multiple variables change (when stepping through the code) and have these values displayed in the debugger window, without having to write "po ..." every time!

Is there a way to do that? I mean, how do xCoders simultaneously see 10-15 variables change as a consequence of stepping over a function?

And thanks for all your answers, this thing has been driving me crazy for quite a while!


Solution

  • First read the documentation (Section Debug Area Help).

    In the variables view (in debug area) you can track when the values change. The changed variables are marked in blue. In addition you can watch the variables.