A variable in my code is being de-allocated somewhere, and i don’t know where. I’m trying to debug it, but there is a lot of code to search through.
Is there a way to follow a variable, and show where it is being modified?
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.
Right click on the variable in XCode’s debugging window, and select “Watch variable”.
Alternatively, use gdb:
http://scottmcpeak.com/memory-errors/
This is discussed here in a similar topic:
Tracking variable or memory change in Xcode?