Is there any way to watch a variable in Xcode using LLDB ? Or is this only possible with GDB ?
I’m trying to use the command watchpoint set variable but I get the message:
invalid command ‘watchpoint set’
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Watchpoints are supported for iOS and Mac OS X debugging as of Xcode 4.5. To set a breakpoint on a variable named
foo, doyou can always use the shortest unambiguous name for commands in the lldb console so
would also work here.
In Xcode, in the locals window you can right-click/control-click on variables and you’ll have an option to set a watchpoint on it.
The current arm and x86 cpus only support 4 watchpoints being active at the same time.