I need to put a breakpoint when someone changes some variable to some value.
I want to catch the exact moment this happens
Any hints please ?
thanks
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.
The kneejerk reaction is to pause the program, add the watchpoint manually by typing:
(or whatever condition you want to evaluate) and then allow it to continue.
You can right click on a variable in the variable list and select ‘Watch “variable name”‘ but there doesn’t seem to be a way to make that conditional.
See the LLDB Tutorial for more on the command line-style interface to debugging; in particular you’ll probably be interested in ‘Setting Watchpoints’ which is about halfway down.