I have an NSString variable called myText
.
How to watch [myText length]
in xcode debugger?
You can use the debugger console to evaluate a property of an object in Xcode, the debugger output view actually functions as an input, too.
Obviously first you have to Hit a breakpoint ...
It actually works with GDB and LLDB and you have to type in the output console :
print (int)[myText length]
In addition to @aleroot's solution, you can use the variable view of the debugger as well. You can right click on the view and select "Add Expression" and type in whatever you want to monitor. It is a little cumbersome compared to @aleroot's solution, but the merit of this method is that it automatically shows again when you hit the same breakpoint next time.
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