Can Xcode calculate the value of an expression while debugging?
I mean like MS visual studio, there is a "watch" window, where the debugger can input expressions composed with the local variables, and vs will calculate the value. can similar thing be done also in xcode? how?
Use the Run/Show/Expressions window. You can also use the print
(or p
) command in the console window (the one with the (gdb)
prompt).