Skip to content

Instantly share code, notes, and snippets.

@sebastianludwig
Last active November 2, 2015 10:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sebastianludwig/86ea8543c776a82b29e1 to your computer and use it in GitHub Desktop.
Save sebastianludwig/86ea8543c776a82b29e1 to your computer and use it in GitHub Desktop.
LLDB command description (including Chisel)
# lldb
apropos -- Find a list of debugger commands related to a particular
word/subject.
b -- ('_regexp-break') Set a breakpoint using a regular expression
to specify the location, where <linenum> is in decimal and
<address> is in hex.
bt -- ('_regexp-bt') Show a backtrace. An optional argument is
accepted; if that argument is a number, it specifies the number
of frames to display. If that argument is 'all', full
backtraces of all threads are displayed.
display -- ('_regexp-display') Add an expression evaluation stop-hook.
undisplay -- ('_regexp-undisplay') Remove an expression evaluation
stop-hook.
env -- ('_regexp-env') Implements a shortcut to viewing and setting
environment variables.
list (l) -- ('_regexp-list') Implements the GDB 'list' command in all of
its forms except FILE:FUNCTION and maps them to the appropriate
'source list' commands.
next (n) -- ('thread step-over') Source level single step in specified
thread (current thread, if none specified), stepping over calls.
nexti (ni) -- ('thread step-inst-over') Single step one instruction in
specified thread (current thread, if none specified), stepping
over calls.
step (s) -- ('thread step-in') Source level single step in specified thread
(current thread, if none specified).
stepi (si) -- ('thread step-inst') Single step one instruction in specified
thread (current thread, if none specified).
finish -- ('thread step-out') Finish executing the function of the
currently selected frame and return to its call site in
specified thread (current thread, if none specified).
continue (c) -- ('process continue') Continue execution of all threads in the
current process.
down -- ('_regexp-down') Go down "n" frames in the stack (1 frame by
default).
up -- ('_regexp-up') Go up "n" frames in the stack (1 frame by
default).
f -- ('frame select') Select a frame by index from within the
current thread and make it the current frame.
print (p) -- ('expression --') Evaluate an expression (ObjC++ or Swift) in
the current program context, using user defined variables and
variables currently in scope.
po -- ('expression -O -- ') Evaluate an expression (ObjC++ or Swift)
in the current program context, using user defined variables and
variables currently in scope.
repl -- ('expression -r -- ') Evaluate an expression (ObjC++ or Swift)
in the current program context, using user defined variables and
variables currently in scope.
x -- ('memory read') Read from the memory of the process being
debugged.
# Chisel
binside -- Set a breakpoint for a relative address within the framework/library that's
currently running. This does the work of finding the offset for the
framework/library and sliding your address accordingly.
bmessage -- Set a breakpoint for a selector on a class, even if the class itself doesn't
override that selector. It walks the hierarchy until it finds a class that does
implement the selector and sets a conditional breakpoint there.
Examples: "-[MyView setFrame:]", "+[MyView awesomeClassMethod]" or "-[0xabcd1234 setFrame:]"
pclass -- Print the inheritance starting from an instance of any class.
pactions -- Print the actions and targets of a control.
pinternals -- Show the internals of an object by dereferencing it as a pointer.
pinvocation -- Print the stack frame, receiver, and arguments of the current invocation. It
will fail to print all arguments if any arguments are variadic (varargs).
pivar -- Print the value of an object's named instance variable.
pkp -- Print out the value of the key path expression using -valueForKeyPath:
wivar -- Set a watchpoint for an object's instance variable.
pcurl -- Print the NSURLRequest (HTTP) as curl command.
pdata -- Print the contents of NSData object as string.
pjson -- Print JSON representation of NSDictionary or NSArray object.
pdocspath -- Print application's 'Documents' directory path.
Add --open/-o to open in Finder
fv -- Find the views whose class names match classNameRegex and puts the address of
first on the clipboard.
fvc -- Find the view controllers whose class names match classNameRegex and puts the
address of first on the clipboard.
Or: Finds a view controller that owns a view.
vs -- Interactively search for a view by walking the hierarchy.
taplog -- Log tapped view to the console.
flicker -- Quickly show and hide a view to quickly help visualize where it is.
hide -- Hide a view or layer.
show -- Show a view or layer.
border -- Draws a border around <viewOrLayer>. Color and width can be optionally
provided.
unborder -- Removes border around <viewOrLayer>.
mask -- Add a transparent rectangle to the window to reveal a possibly obscured or
hidden view or layer's bounds.
unmask -- Remove mask from a view or layer.
caflush -- Force Core Animation to flush. This will 'repaint' the UI but also may mess
with ongoing animations.
alamborder -- Put a border around views with an ambiguous layout
alamunborder -- Removes the border around views with an ambiguous layout
paltrace -- Print the Auto Layout trace for the given view. Defaults to the key window.
pviews -- Print the recursion description of <aView>.
ptv -- Print the highest table view in the hierarchy.
pcells -- Print the visible cells of the highest table view in the hierarchy.
pca -- Print layer tree from the perspective of the render server.
presponder -- Print the responder chain starting from a specific responder.
pvc -- Print the recursion description of <aViewController>.
visualize -- Open a UIImage, CGImageRef, UIView, or CALayer in Preview.app on your Mac.
panim -- Prints if the code is currently execution with a UIView animation block.
slowanim -- Slows down animations. Works on the iOS Simulator and a device.
unslowanim -- Turn off slow animations.
fa11y -- Find the views whose accessibility labels match labelRegex and puts the address
of the first result on the clipboard.
pa11y -- Print accessibility labels of all views in hierarchy of <aView>.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment