Skip to content
Ben Goertz edited this page Jan 12, 2015 · 2 revisions

Commands

alamborder

Put a border around views with an ambiguous layout

Options: --color/-c <color>; Type: string; A color name such as 'red', 'green', 'magenta', etc. --width/-w <width>; Type: CGFloat; Desired width of border.

Syntax: alamborder [--color=color] [--width=width]

alamunborder

Removes the border around views with an ambiguous layout

Syntax: alamunborder

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.

Arguments: <address>; Type: string; Address within the currently running framework to set a breakpoint on.

Syntax: binside <address>

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.

Arguments: <expression>; Type: string; Expression to set a breakpoint on, e.g. "-[MyView setFrame:]", "+[MyView awesomeClassMethod]" or "-[0xabcd1234 setFrame:]"

Syntax: bmessage <expression>

border

Draws a border around <viewOrLayer>. Color and width can be optionally provided.

Arguments: <viewOrLayer>; Type: UIView/NSView/CALayer *; The view/layer to border. NSViews must be layer-backed.

Options: --color/-c <color>; Type: string; A color name such as 'red', 'green', 'magenta', etc. --width/-w <width>; Type: CGFloat; Desired width of border.

Syntax: border [--color=color] [--width=width] <viewOrLayer>

caflush

Force Core Animation to flush. This will 'repaint' the UI but also may mess with ongoing animations.

Syntax: caflush

fa11y

Find the views whose accessibility labels match labelRegex and puts the address of the first result on the clipboard.

Arguments: <labelRegex>; Type: string; The accessibility label regex to search the view hierarchy for.

Syntax: fa11y <labelRegex>

flicker

Quickly show and hide a view to quickly help visualize where it is.

Arguments: <viewOrLayer>; Type: UIView/NSView*; The view to flicker.

Syntax: flicker <viewOrLayer>

fv

Find the views whose class names match classNameRegex and puts the address of first on the clipboard.

Arguments: <classNameRegex>; Type: string; The view-class regex to search the view hierarchy for.

Syntax: fv <classNameRegex>

fvc

Find the view controllers whose class names match classNameRegex and puts the address of first on the clipboard.

Options: --name/-n <classNameRegex>; Type: string; The view-controller-class regex to search the view controller hierarchy for. --view/-v <view>; Type: UIView; This function will print the View Controller that owns this view.

Syntax: fvc [--name=classNameRegex] [--view=view]

hide

Hide a view or layer.

Arguments: <viewOrLayer>; Type: UIView/NSView/CALayer *; The view/layer to hide.

Syntax: hide <viewOrLayer>

mask

Add a transparent rectangle to the window to reveal a possibly obscured or hidden view or layer's bounds

Arguments: <viewOrLayer>; Type: UIView/NSView/CALayer *; The view/layer to mask.

Options: --color/-c <color>; Type: string; A color name such as 'red', 'green', 'magenta', etc. --alpha/-a <alpha>; Type: CGFloat; Desired alpha of mask.

Syntax: mask [--color=color] [--alpha=alpha] <viewOrLayer>

paltrace

Print the Auto Layout trace for the given view. Defaults to the key window.

Arguments: <view>; Type: UIView *; The view to print the Auto Layout trace for.

Syntax: paltrace <view>

panim

Prints if the code is currently execution with a UIView animation block.

Syntax: panim

pca

Print layer tree from the perspective of the render server.

Syntax: pca

pcells

Print the visible cells of the highest table view in the hierarchy.

Syntax: pcells

pclass

Print the inheritance starting from an instance of any class.

Arguments: <object>; Type: id; The instance to examine.

Syntax: pclass <object>

pinternals

Show the internals of an object by dereferencing it as a pointer.

Arguments: <object>; Type: id; Object expression to be evaluated.

Syntax: pinternals <object>

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).

NOTE: Sadly this is currently only implemented on x86.

Options: --all/-a ; Specify to print the entire stack instead of just the current frame.

Syntax: pinvocation [--all]

pivar

Print the value of an object's named instance variable.

Arguments: <object>; Type: id; Object expression to be evaluated. <ivarName>; Type: ; Name of instance variable to print.

Syntax: pivar <object> <ivarName>

pkp

Print out the value of the key path expression using -valueForKeyPath:

Arguments: <keypath>; Type: NSString *; The keypath to print

Syntax: pkp <keypath>

presponder

Print the responder chain starting from a specific responder.

Arguments: <startResponder>; Type: UIResponder *; The responder to use to start walking the chain.

Syntax: presponder <startResponder>

ptv

Print the highest table view in the hierarchy.

Syntax: ptv

pvc

Print the recursion description of <aViewController>.

Arguments: <aViewController>; Type: UIViewController*; The view controller to print the description of.

Syntax: pvc <aViewController>

pviews

Print the recursion description of <aView>.

Arguments: <aView>; Type: UIView*/NSView*; The view to print the description of.

Options: --up/-u ; Print only the hierarchy directly above the view, up to its window. --depth/-d <depth>; Type: int; Print only to a given depth. 0 indicates infinite depth.

Syntax: pviews [--up] [--depth=depth] <aView>

show

Show a view or layer.

Arguments: <viewOrLayer>; Type: UIView/NSView/CALayer *; The view/layer to show.

Syntax: show <viewOrLayer>

taplog

Log tapped view to the console.

Syntax: taplog

unborder

Removes border around <viewOrLayer>.

Arguments: <viewOrLayer>; Type: UIView/NSView/CALayer *; The view/layer to unborder.

Syntax: unborder <viewOrLayer>

unmask

Remove mask from a view or layer

Arguments: <viewOrLayer>; Type: UIView/CALayer *; The view/layer to mask.

Syntax: unmask <viewOrLayer>

visualize

Open a UIImage, CGImageRef, UIView, or CALayer in Preview.app on your Mac.

Arguments: <target>; Type: (id); The object to visualize.

Syntax: visualize <target>

vs

Interactively search for a view by walking the hierarchy.

Arguments: <view>; Type: UIView*; The view to border.

Syntax: vs <view>

wivar

Set a watchpoint for an object's instance variable.

Arguments: <object>; Type: id; Object expression to be evaluated. <ivarName>; Type: ; Name of the instance variable to watch.

Syntax: wivar <object> <ivarName>

Clone this wiki locally