Configure the condition with breakpoint modify -c '<<condition>>' 1
Configure expressions to evaluate/actions to perform when the breakpoint is hit with breakpoint command add <<breakpoint ID>>
Knowing how to use lldb for this is really great because not only can it be faster, but Xcode's graphical debugger breaks ALL THE TIME and gives slow and sometimes inaccurate information. lldb directly is faster and also works well on all sorts of different languages
It does, just not well. Have you ever hit a breakpoint in a function with a ton of variables? Xcode just freezes for a like ten seconds while it runs a recursive inspection on every single variable, no matter how complex it is.
13
u/SirensToGo Objective-C / Swift Oct 31 '20
You can also do all of this from the lldb itself:
Set a breakpoint somewhere (
br s -n "-[Class func]")Configure the condition with
breakpoint modify -c '<<condition>>' 1Configure expressions to evaluate/actions to perform when the breakpoint is hit with
breakpoint command add <<breakpoint ID>>Knowing how to use lldb for this is really great because not only can it be faster, but Xcode's graphical debugger breaks ALL THE TIME and gives slow and sometimes inaccurate information. lldb directly is faster and also works well on all sorts of different languages