How can I automate setting a breakpoint on all methods in an Objective C class using lldb?
This is useful for learning the behavior of a complicated legacy class. I am u
br se -f FooViewController.m -p '^@property|^ *- *\('
"br se" is short for "breakpoint set", pass your own filename to the -f
argument, and the -p
argument is a crude regex for properties and methods in Objective C.
Caveats: This doesn't seem to work for .h
files, so if you have properties declared in the header that you want to watch then you may need to set watchpoints on their backing instance variables.
This is the best solution I have found so far, please post alternative solutions if you think they will be helpful.