How do you watch a variable in xcode 4? I'm not sure how to do this.
We can show or hide the variables view and the console by clicking the middle view control at the top right or by clicking the leftmost button of the debug bar. The variables view is empty at the moment because the application isn't paused.
Any item of data within a program that a programmer wants to observe when debugging. Watch variables may be viewed while the program runs on its own, is stepped through instruction by instruction or when the program crashes. Setting watch variables is part of the debugging operation in a compiler.
Use the bt command in (lldb). Once paused or after a crash, just type bt into the debug console. It will print the full stack trace. Awesome tip for tracking down a constraint issue after setting the symbolic breakpoint.
Right click in the local variables window to see the "Watch Expression" menu command. Type the variable name and the variable will be added.
"Watch VariableName" is available in debug area. Just right click on a var and select "Watch var".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With