iosxcodedebugginglldbwatchpoint

LLDB – Set watchpoint on instance variable of arbitrary object


For some weird reason, seguieing back to a view controller changes the userInteractionEnabled of my view's subview _settingsButton which is of UIButton type. I want to know why this happens. After setting a breakpoint in the view controller's code, I attempt to do this:

enter image description here

But I have no idea how to access an instance variable of the _settingsButton property of my view controller. How do I do this?


Solution

  • In my experience, the simplest way to do this is to set a symbolic breakpoint on (in your case) [UIButton setUserInteractionEnabled:], in the breakpoints panel on the left side. Click +, then symbolic breakpoint, and then the quoted string above. I have done this in the past and it does work, so if you have any grief with the above, you could fiddle with the syntax a bit.