在 LLDB 中为 Objective-C 设置断点

To set a breakpoint Objective C selectors named alignLeftEdges: you can enter either of:

(lldb) breakpoint set --selector alignLeftEdges: 
(lldb) breakpoint set -S alignLeftEdges:

You can limit any breakpoints to a specific executable image by using the "--shlib <path>" ("-s <path>" for short):

(lldb) breakpoint set --shlib foo.dylib --name foo 
(lldb) breakpoint set -s foo.dylib -n foo

Suggestions on more interesting primitives of this sort are also very welcome.

Just like gdb, the lldb command interpreter does a shortest unique string match on command names, so the following two commands will both execute the same command:

(lldb) breakpoint set -n "-[SKTGraphicView alignLeftEdges:]" 
(lldb) br s -n "-[SKTGraphicView alignLeftEdges:]"

你可能感兴趣的:(Objective-C)