Introduction to Chisel
-
What is Chisel?
Chisel is an open-source set of LLDB commands from Facebook to assist developers in debugging iOS applications. The commands in chisel are run based on the python script interpreter supported by LLDB. That is to say: chisel is actually a collection of Python scripts. These Python scripts splice command strings and then let LLDB execute them. The python script corresponding to each command of chisel is saved in the path of / usr / local / cell / chisel / 2.0.1/libexec. Developers familiar with Python can try to read the contents of these script files
-
Installation of Chisel
brew update brew install chisel
~ > brew install chisel ==> Downloading https://ghcr.io/v2/homebrew/core/chisel/manifests/2.0.1 ######################################################################## 100.0% ==> Downloading https://ghcr.io/v2/homebrew/core/chisel/blobs/sha256:7ef6b79ffa9 ==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sh ######################################################################## 100.0% ==> Pouring chisel--2.0.1.catalina.bottle.tar.gz ==> Caveats Add the following line to ~/.lldbinit to load chisel when Xcode launches: command script import /usr/local/opt/chisel/libexec/fbchisellldb.py ==> Summary 🍺 /usr/local/Cellar/chisel/2.0.1: 33 files, 313.3KB
If ~ / If the lldbinit file does not exist, the developer can create and open it through the terminal
touch ~/.lldbinit open ~/.lldbinit
According to the prompt output when Homebrew installs Chisel, add the following command to ~ / lldbinit file
command script import /usr/local/opt/chisel/libexec/fbchisellldb.py
Alternatively, Download Chisel manually and add the following command to ~ / lldbinit file
command script import /path/to/fbchisellldb.py
The commands in Chisel will be available the next time Xcode starts
Chisel command details
alamborder
(lldb) help alamborder # Place a border around the view with conflicting constraints # Expected raw input (see 'help raw input') Options: --color/-c <color> # Type: string # The color of the border, such as red, green, magenta --width/-w <width> # Type: CGFloat # border width Syntax: alamborder [--color=color] [--width=width] # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbautolayoutcommands Py is implemented as fbautolayoutborderambigous
alamunborder
(lldb) help alamunborder # Remove borders around views with conflicting constraints # Expected raw input (see 'help raw input') Syntax: alamunborder # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbautolayoutcommands Py is implemented as fbautolayoutunbordambiguous
bdisable
(lldb) help bdisable # Disables a set of breakpoints identified by the specified expression < expression > # Expected raw input (see 'help raw input') # Examples are as follows: # Use bdisable address to switch the breakpoint of the specified memory address to disable bdisable 0x0000000104514dfc bdisable 0x183e23564 # Use bdisable filename to switch all breakpoints in the specified file to disable bdisable SUNNetService.m # Use bdisable module to switch all breakpoints in the specified module to disable bdisable UIKit bdisable Foundation Arguments: <expression> # Type: string # Expression to disable breakpoints Syntax: bdisable <expression> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbdebugcommands Py is implemented as FBMethodBreakpointDisableCommand
benable
(lldb) help benable # Enables a set of breakpoints identified by the specified expression < expression > # Expected raw input (see 'help raw input') # Examples are as follows: # Use benable address to switch the breakpoint of the specified memory address to enable benable 0x0000000104514dfc benable 0x183e23564 # Use benable filename to switch all breakpoints in the specified file to enable benable SUNNetService.m # Use benable module to switch all breakpoints in the specified module to enable benable UIKit benable Foundation Arguments: <expression> # Type: string # Expression to enable breakpoints Syntax: benable <expression> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbdebugcommands Py is implemented as FBMethodBreakpointEnableCommand
binside
(lldb) help binside # Set breakpoints for relative addresses in the currently running framework/library # This command can find the offset of framework/library and slide to the specified relative address accordingly # Expected raw input (see 'help raw input') Arguments: <address> # Type: string # In the currently running framework/library, the address of the breakpoint to be set Syntax: binside <address> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbdebugcommands Py is implemented as FBFrameworkAddressBreakpointCommand
bmessage
(lldb) help bmessage # Sets a breakpoint for the method selector specified in the specified class, even if the class itself does not override the method specified by the method selector # This command traverses the hierarchy of the class until it finds a class that implements the specified method selector and sets a conditional breakpoint there # Expected raw input (see 'help raw input') Arguments: <expression> # Type: string # Expressions used to set breakpoints, for example: "- [MyView setFrame:]," + [MyView awesomeClassMethod], "- [0xabcd1234 setFrame:]" Syntax: bmessage <expression> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbdebugcommands Py is implemented as FBMethodBreakpointCommand
Implementation principle of bmessage command (symbolic breakpoint of non rewriting method):
Suppose you want to know when - [MyViewController viewDidAppear:] is called. What if this method is not implemented in MyViewController, but in its parent class UIViewController? Try to set a symbol breakpoint in MyViewController, and the following results will appear:
(lldb) b -[MyViewController viewDidAppear:] Breakpoint 1: no locations (pending). WARNING: Unable to resolve breakpoint to any actual locations.
Because LLDB will find a symbol of viewDidAppear: in MyViewController class, but it can not be found in MyViewController class, so the breakpoint will never be resolved. At this time, what you need to do is put the breakpoint on UIViewController and set a condition for the breakpoint [self isKindOfClass:[MyViewController class]]. Under normal circumstances, setting a breakpoint condition like this can work normally. But not here, because we don't have the implementation of the parent UIViewController. Because - [UIViewController viewDidAppear:] is a method implemented by apple, we do not have its symbol, so there is no self in the method. If you want to use self on the condition of the symbolic breakpoint, you must know where self is (self may be on the register or on the stack; in x86, you can find self in $esp+4). But it's painful because now you have to know at least four architectures (x86, x86-64, armv7, armv64). Imagine how much time it takes you to learn the instruction set and the calling convention of each of them, and then write a command that sets a breakpoint on your superclass and has the right conditions. Fortunately, this was solved in Chisel. This is called bmessage:
(lldb) bmessage -[MyViewController viewDidAppear:] Setting a breakpoint at -[UIViewController viewDidAppear:] with condition (void*)object_getClass((id)$rdi) == 0x0000000105154570 Breakpoint 2: where = UIKitCore`-[UIViewController viewDidAppear:], address = 0x00007fff23f6968e
border
(lldb) help border # Draws a border around the specified view/layer # You can choose to provide the color and width of the border # In addition, you can provide a depth to recursively draw the border of the child view of the specified view/layer # Expected raw input (see 'help raw input') Arguments: <viewOrLayer> # Type: UIView* / NSView* / CALayer* # To draw the view/layer of the border, NSView must be layer backed Options: --color/-c <color> # Type: string # The color of the border, such as red, green, magenta --width/-w <width> # Type: CGFloat # border width --depth/-d <depth> # Type: int # The level depth of the subview where you want to draw the border # Starting from the provided or default colors, each level has a different color Syntax: border [--color=color] [--width=width] [--depth=depth] <viewOrLayer> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbdisplaycommands Py is implemented as FBDrawBorderCommand
caflush
(lldb) help caflush # Force Core Animation to refresh # This command causes the UI to repaint, but it may also interfere with the animation in progress # Expected raw input (see 'help raw input') Syntax: caflush # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbdisplaycommands Py is implemented as fbcoreanimation flushcommand
copy
(lldb) help copy # Copy the specified data to your Mac # Expected raw input (see 'help raw input') Arguments: <target> # Type: (id) # Objects to copy Options: --filename/-f <filename> # Type: string # The name of the file whose data is to be exported --no-open/-n # Do not open the file Syntax: copy [--filename=filename] [--no-open] <target> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbcopycommands Py is implemented as FBCopyCommand
dcomponents
(lldb) help dcomponents # Setting debugging options for components # Expected raw input (see 'help raw input') Options: --set/-s # Enable debug mode for components --unset/-u # Disable debug mode for components Syntax: dcomponents [--set] [--unset] # This command is available at / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbcomponentcommands Py is implemented as FBComponentsDebugCommand
dismiss
(lldb) help dismiss # Disassiss specified controller < viewcontroller > # Expected raw input (see 'help raw input') Arguments: <viewController> # Type: UIViewController* # Disas controller Syntax: dismiss <viewController> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbdisplaycommands Py is implemented as FBDismissViewControllerCommand
fa11y
(lldb) help fa11y # Find the view whose accessibility label matches the specified regular expression < labelregex >, and put the address of the first result found on the clipboard # What is an accessibility tag? For example: UILabel, title of UIButton # Expected raw input (see 'help raw input') Arguments: <labelRegex> # Type: string # A regular expression used to search for accessibility tags in the view hierarchy Syntax: fa11y <labelRegex> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbaccessibilitycommands Py is implemented as FBFindViewByAccessibilityLabelCommand
findinstances
(lldb) help findinstances # Finds an instance of the specified Objective-C class # Expected raw input (see 'help raw input') # This command scans memory and uses exploratory methods to identify instances of the Objective-C class # Includes Swift classes that inherit from NSObject # Basic example: # The following basic search looks for instances of the specified class or protocol # By default, subclasses of the specified class or protocol are included in the search results # If you only need to find an instance of the exact class, add an asterisk (*) prefix, for example: * UIScrollView findinstances UIScrollView findinstances *UIScrollView findinstances UIScrollViewDelegate # Advanced example: # Find all views that are hidden, invisible, and not in the window findinstances UIView hidden == true || alpha == 0 || window == nil # Find views with zero width or zero height findinstances UIView layer.bounds.#size.width == 0 || layer.bounds.#size.height == 0 # Find leaf views without child views findinstances UIView subviews.@count == 0 # Find a dictionary with a key that may be a password or passphrase findinstances NSDictionary any @allKeys beginswith 'pass' # The advanced example above uses filters # The filter is implemented using NSPredicate. For more details about the filter, please refer to the relevant documents of NSPredicate # The basic NSPredicate expression has a relatively predictable syntax # There are some exceptions, see https://github.com/facebook/chisel/wiki/findinstances Arguments: <type> # Type: string # Name of class or protocol <query> # Type: string # The expression used for the query uses the syntax of NSPredicate Syntax: findinstances <type> <query> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbdebugcommands Py is implemented as FBFindInstancesCommand
flicker
(lldb) help flicker # Quickly show and hide the specified view (that is, quickly flash the specified view) to help developers quickly and visually locate the position of the specified view in the interface # Expected raw input (see 'help raw input') Arguments: <viewOrLayer> # Type: UIView* / NSView* # View to blink Syntax: flicker <viewOrLayer> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbflickrcommands Py is implemented as FBFlickerViewCommand
fv
(lldb) help fv # Find the view whose class name matches the specified regular expression < classnameregex >, and put the address of the first instance found on the clipboard # Expected raw input (see 'help raw input') Arguments: <classNameRegex> # Type: string # A regular expression used to search for view classes in the view hierarchy Syntax: fv <classNameRegex> # This command is available in / usr / local / cell / chisel / 2.0.1/libexec/commands/fbfindcommands Py is implemented as FBFindViewCommand
fvc
(lldb) help fvc # Find the controller whose class name matches the specified regular expression < classnameregex >, and put the address of the first instance found on the clipboard # Expected raw input (see 'help raw input') Options: --name/-n <classNameRegex> # Type: string # A regular expression used to search for controller classes in the controller hierarchy --view/-v <view> # Type: UIView # This option prints the controller with the specified view < View > Syntax: fvc [--name=classNameRegex] [--view=view] # This command is available in / usr / local / cell / chisel / 2.0.1/libexec/commands/fbfindcommands Py is implemented as FBFindViewControllerCommand
heapfrom
(lldb) help heapfrom # Displays all nested heap pointers contained in the specified variable # Expected raw input (see 'help raw input') Syntax: heapfrom # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbdebugcommands Py is implemented as FBHeapFromCommand
hide
(lldb) help hide # Hide the specified view/layer # Expected raw input (see 'help raw input') Arguments: <viewOrLayer> # Type: UIView* / NSView* /CALayer* # view/layer to hide Syntax: hide <viewOrLayer> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbdisplaycommands Py is implemented as FBHideViewCommand
mask
(lldb) help mask # Add a translucent rectangle to the current window to show the boundary of the view/layer that may be obscured or hidden # That is, add a mask to the specified view/layer # Expected raw input (see 'help raw input') Arguments: <viewOrLayer> # Type: UIView* / NSView* / CALayer* # view/layer to add mask Options: --color/-c <color> # Type: string # The color of the mask, such as red, green, magenta --alpha/-a <alpha> # Type: CGFloat # Transparency of mask Syntax: mask [--color=color] [--alpha=alpha] <viewOrLayer> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbdisplaycommands Py is implemented as FBMaskViewCommand
mwarning
(lldb) help mwarning # Analog memory warning # Expected raw input (see 'help raw input') Syntax: mwarning # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbdebugcommands Py is implemented as FBMemoryWarningCommand
pa11y
(lldb) help pa11y # Print accessibility in all view hierarchies < aview > # What is an accessibility tag? For example: UILabel, title of UIButton # Expected raw input (see 'help raw input') Arguments: <aView> # Type: UIView* # View to print accessibility labels for all views in the hierarchy Syntax: pa11y <aView> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbaccessibilitycommands Py is implemented as FBPrintAccessibilityLabels
pa11yi
(lldb) help pa11yi # Prints the accessibility identifier of all views in the hierarchy of the specified view < aview > # Expected raw input (see 'help raw input') Arguments: <aView> # Type: UIView* # View to print accessibility identifiers for all views in the hierarchy Syntax: pa11yi <aView> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbaccessibilitycommands Py is implemented as FBPrintAccessibilityIdentifiers
pactions
(lldb) help pactions # Prints the actions and targets of the specified control # Expected raw input (see 'help raw input') Arguments: <control> # Type: UIControl* # The control whose actions and targets you want to view Syntax: pactions <control> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbprintcommands Py is implemented as FBPrintTargetActions
paltrace
(lldb) help paltrace # Print the auto layout trace of the specified view < View >, which is the main window by default # Expected raw input (see 'help raw input') Arguments: <view> # Type: UIView* # To print the view of auto layout trace Syntax: paltrace <view> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbautolayoutcommands Py is implemented as FBPrintAutolayoutTrace
panim
(lldb) help panim # Print if the code is currently executing using UIView Animation Block Syntax: panim # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbprintcommands Py is implemented as FBPrintIsExecutingInAnimationBlockCommand
pbcopy
(lldb) help pbcopy # Print the specified object < Object >, and copy the output to the clipboard # Expected raw input (see 'help raw input') Arguments: <object> # Type: id # Objects to print Syntax: pbcopy <object> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbprintcommands Py is implemented as FBPrintToClipboard
pblock
(lldb) help pblock # Print the implementation address and signature of the specified code block < block > # Expected raw input (see 'help raw input') Arguments: <block> # To print the code block object that implements the address and signature Syntax: pblock <block> # This command is in / usr / local / cell / chisel / 2.0.1/libexec/commands/fbclassdump Py is implemented as FBPrintBlock
pbundlepath
(lldb) help pbundlepath # Prints the path to the Bundle directory of the current application # Expected raw input (see 'help raw input') Options: --open/-o # Open the Bundle directory of the current application in Finder Syntax: pbundlepath [--open] # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbprintcommands Py is implemented as FBPrintApplicationBundlePath
pcells
(lldb) help pcells # Print the visible cell of the top table view in the view hierarchy # Expected raw input (see 'help raw input') Syntax: pcells # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbprintcommands Py is implemented as fbprintonscreen tableviewcells
pclass
(lldb) help pclass # Prints the inheritance hierarchy starting from the class to which the specified object < Object > belongs # Expected raw input (see 'help raw input') Arguments: <object> # Type: id # The instance object to view the inheritance hierarchy Syntax: pclass <object> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbprintcommands Py is implemented as FBPrintInheritanceHierarchy
pcomponents
(lldb) help pcomponents # Print the recursive description of the components found from the specified view < aview > # Expected raw input (see 'help raw input') Arguments: <aView> # Type: UIView* / CKComponent* # View to start searching for components Options: --up/-u # Print only the components hierarchy found on the first superview with them and bring the search to its window --show-views/-v <showViews> # Type: BOOL # If the supplied parameter is NO, the components hierarchy is printed and the view is not printed # The view is printed by default (that is, yes by default) Syntax: pcomponents [--up] [--show-views=showViews] <aView> # This command is available at / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbcomponentcommands Py is implemented as fbcomponentsprint command
pcurl
(lldb) help pcurl # Print the specified request < request > as curl command # Expected raw input (see 'help raw input') Arguments: <request> # Type: NSURLRequest* / NSMutableURLRequest* # Request to convert to curl command Options: --embed-data/-e # Embed the request data into base64 encoding Syntax: pcurl [--embed-data] <request> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbprintcommands Py is implemented as FBPrintAsCurl
pdata
(lldb) help pdata # Prints the contents of the specified NSData object as a string # Expected raw input (see 'help raw input') Arguments: <data> # Type: NSData* # NSData object to print Options: --encoding/-e <encoding> # Type: string # The default encoding is UTF-8 # Supported encoding types: - ascii, - utf8, - utf16, unicode, - utf16l (Little endian), - utf16b (Big endian), - utf32, - utf32l (Little endian), - utf32b (Big endian), - latin1, iso88591 (88591), - latin2, iso88592 (88592), - cp1251 (1251), - cp1252 (1252), - cp1253 (1253), - cp1254 (1254), - cp1250 (1250), Syntax: pdata [--encoding=encoding] <data> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbprintcommands Py is implemented as FBPrintData
pdocspath
(lldb) help pdocspath # Prints the path to the Documents directory of the current application # Expected raw input (see 'help raw input') Options: --open/-o # Open the Documents directory of the application in Finder Syntax: pdocspath [--open] # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbprintcommands Py is implemented as FBPrintApplicationDocumentsPath
pinternals
(lldb) help pinternals # The internal structure of the object is displayed by disassociating the specified object < Object > into a pointer # That is, the member variable used to view the object # Expected raw input (see 'help raw input') Arguments: <object> # Type: id # Object expression to execute Options: --apple/-a # Print ivar as apple Syntax: pinternals [--apple] <object> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbprintcommands Py is implemented as FBPrintInternals
pinvocation
(lldb) help pinvocation # Print the stack frame, receiver and arguments of the current method call # If any of the parameters are variable, you will not be able to print all the parameters # Expected raw input (see 'help raw input') # Note: Unfortunately, this command is currently only implemented on x86 architecture Options: --all/-a # Used to specify that the entire method call stack is to be printed, not just the current stack frame Syntax: pinvocation [--all] # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbinvocationcommands Py is implemented as FBPrintInvocation
pivar
(lldb) help pivar # Print the value of the member variable identified by the specified name < ivarname > in the specified instance object < Object > # Expected raw input (see 'help raw input') Arguments: <object> # Type: id # Object expression to execute <ivarName> # Type: string # The name of the member variable to print Syntax: pivar <object> <ivarName> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbprintcommands Py is implemented as FBPrintInstanceVariable
pjson
(lldb) help pjson # Prints the JSON representation of an NSDictionary or NSArray object # Expected raw input (see 'help raw input') Arguments: <object> # Type: id # NSDictionary or NSArray object to print Options: --plain/-p # Plain JSON Syntax: pjson [--plain] <object> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbprintcommands Py is implemented as FBPrintJSON
pkp
(lldb) help pkp # Use - valueForKeyPath: to print out the value of the keypath expression # Expected raw input (see 'help raw input') Arguments: <keypath> # Type: NSString* # Keypath to print values Syntax: pkp <keypath> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbprintcommands Py is implemented as FBPrintKeyPath
pmethods
(lldb) help pmethods # Print the class method and object method of the class identified by the specified class object or instance object < instance or class > # Expected raw input (see 'help raw input') Arguments: <instance or class> # Type: instance/Class # An Objective-C class object or instance object Options: --address/-a # Implementation address of printing method --instance/-i # Print object method --class/-c # Print class method --name/-n # Take the parameter as the class name Syntax: pmethods [--address] [--instance] [--class] [--name] <instance or class> # This command is in / usr / local / cell / chisel / 2.0.1/libexec/commands/fbclassdump Py is implemented as FBPrintMethods
poobjc
(lldb) help poobjc # Print the execution result of the specified expression < expression >, which will be executed in the context of ObjC + + # This command is the shorthand format of the "expression -O -l ObjC + + --" command # Expected raw input (see 'help raw input') Arguments: <expression> # ObjC expressions for printing and execution Syntax: poobjc <expression> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbprintcommands Py is implemented as FBPrintObjectInObjc
pproperties
(lldb) help pproperties # Print the properties of the class identified by the specified class object or instance object < instance or class > # Expected raw input (see 'help raw input') Arguments: <instance or class> # Type: instance/Class # An Objective-C class object or instance object Options: --name/-n # Take the parameter as the class name Syntax: pproperties [--name] <instance or class> # This command is in / usr / local / cell / chisel / 2.0.1/libexec/commands/fbclassdump Py is implemented as FBPrintProperties
present
(lldb) help present # Controller specified by present < viewcontroller > # Expected raw input (see 'help raw input') Arguments: <viewController> # Type: UIViewController* # Controller to present Syntax: present <viewController> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbdisplaycommands Py is implemented as FBPresentViewControllerCommand
presponder
(lldb) help presponder # Print the responder chain from the specified responder < startresponder > # That is, view the responder chain of the specified control < startresponder > # Expected raw input (see 'help raw input') Arguments: <startResponder> # Type: UIResponder* # The initial responder used to start traversing the responder chain Syntax: presponder <startResponder> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbprintcommands Py is implemented as FBPrintUpwardResponderChain
psjson
(lldb) help psjson # Prints the JSON representation of a Swift Dictionary or Swift Array object # Expected raw input (see 'help raw input') Arguments: <object> # Type: NSObject* # Swift Dictionary or Swift Array object to print Options: --plain/-p # Plain JSON Syntax: psjson [--plain] <object> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbprintcommands Py is implemented as FBPrintSwiftJSON
ptv
(lldb) help ptv # Print the top table view in the view hierarchy # Expected raw input (see 'help raw input') Syntax: ptv # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbprintcommands Py is implemented as fbprintonscreen tableview
pvc
(lldb) help pvc # Print the recursion description of the specified controller < avivcontroller > # That is, print the hierarchical relationship of the specified controller < avivcontroller > # Expected raw input (see 'help raw input') Arguments: <aViewController> # Type: UIViewController* # Controller to print recursive description Syntax: pvc <aViewController> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbprintcommands Py is implemented as FBPrintViewControllerHierarchyCommand
pviews
(lldb) help pviews # Print the recursion description of the specified view < aview > # That is, print the hierarchical relationship of the specified view < aview > # Expected raw input (see 'help raw input') Arguments: <aView> # Type: UIView* / NSView* # View to print recursive description Options: --up/-u # Prints only the hierarchy directly above the specified view until it belongs to the window --depth/-d <depth> # Type: int # Only print to the specified level depth, 0 means infinite depth --window/-w <window> # Type: int # Specifies the window to print the recursive description # Use the "po (id)[[UIApplication sharedApplication] windows]" command to check which windows currently exist --short/-s # Print a short description of the view --medium/-m # Print the medium description of the view Syntax: pviews [--up] [--depth=depth] [--window=window] [--short] [--medium] <aView> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbprintcommands Py is implemented as FBPrintViewHierarchyCommand
rcomponents
(lldb) help rcomponents # Synchronously rearrange and update all components # Expected raw input (see 'help raw input') Syntax: rcomponents # This command is available at / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbcomponentcommands Py is implemented as FBComponentsReflowCommand
sequence
(lldb) help sequence # Run the commands in sequence and stop when there are any errors # Expected raw input (see 'help raw input') Syntax: sequence # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbdebugcommands Py is implemented as FBSequenceCommand
setinput
(lldb) help setinput # Input the specified text < inputtext > into the text field or text view as the first responder # Expected raw input (see 'help raw input') Arguments: <inputText> # Type: string # Text to enter Syntax: setinput <inputText> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbtextinputcommands Py is implemented as FBInputTexToFirstResponderCommand
settext
(lldb) help settext # Set the specified text < replacementtext > for the view identified by the specified accessibility identifier < accessibilityid > # Expected raw input (see 'help raw input') Arguments: <accessibilityId> # Type: string # The accessibility identifier of the view for which you want to set text <replacementText> # Type: string # Text to set Syntax: settext <accessibilityId> <replacementText> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbtextinputcommands Py is implemented as FBInputTexByAccessibilityIdCommand
show
(lldb) help show # Displays the specified view/layer # Expected raw input (see 'help raw input') Arguments: <viewOrLayer> # Type: UIView* / NSView* / CALayer* # view/layer to display Syntax: show <viewOrLayer> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbdisplaycommands Py is implemented as FBShowViewCommand
slowanim
(lldb) help slowanim # Slow down animation # For iOS emulators and devices # Expected raw input (see 'help raw input') Arguments: <speed> # Type: float # Animation speed (default = 0.1) Syntax: slowanim <speed> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbdisplaycommands Py is implemented as FBSlowAnimationCommand
taplog
(lldb) help taplog # Output the clicked view to the console (the control should be able to respond to click events) # Expected raw input (see 'help raw input') Syntax: taplog # This command is available in / usr / local / cell / chisel / 2.0.1/libexec/commands/fbfindcommands Py is implemented as FBTapLoggerCommand
uikit
(lldb) help uikit # Import the UIKit module to access the types in UIKit in LLDB # Expected raw input (see 'help raw input') Syntax: uikit # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbimportcommands Py is implemented as ImportUIKitModule
unborder
(lldb) help unborder # Removes the border around the specified view/layer # Expected raw input (see 'help raw input') Arguments: <viewOrLayer> # Type: UIView* / NSView* / CALayer* # view/layer to remove border Options: --depth/-d <depth> # Type: int # The level depth of the subview from which you want to remove the border Syntax: unborder [--depth=depth] <viewOrLayer> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbdisplaycommands Py is implemented as FBRemoveBorderCommand
unmask
(lldb) help unmask # Remove the mask on the specified view/layer # Expected raw input (see 'help raw input') Arguments: <viewOrLayer> # Type: UIView* / CALayer* # view/layer to remove mask Syntax: unmask <viewOrLayer> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbdisplaycommands Py is implemented as FBUnmaskViewCommand
unslowanim
(lldb) help unslowanim # Disable animation slowdown # Expected raw input (see 'help raw input') Syntax: unslowanim # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbdisplaycommands Py is implemented as FBUnslowAnimationCommand
visualize
(lldb) help visualize # Preview on Mac Open UIImage, CGImageRef, UIView, CALayer and CVPixelBuffer objects in app # Expected raw input (see 'help raw input') Arguments: <target> # Type: (id) # Objects to visualize Syntax: visualize <target> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbvisualizationcommands Py is implemented as FBVisualizeCommand
vs
(lldb) help vs # By traversing the hierarchical structure of the view, the view can be searched dynamically in an interactive way # Expected raw input (see 'help raw input') Arguments: <view> # Type: UIView* # Current view to navigate to (starting point for interactive search) Syntax: vs <view> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbflickrcommands Py is implemented as FBViewSearchCommand
wivar
(lldb) help wivar # Sets a memory breakpoint for the member variable identified by the name < ivarname > specified in the specified object < Object > # Expected raw input (see 'help raw input') Arguments: <object> # Type: id # Object expression to execute <ivarName> # Type: string # The name of the member variable to monitor Syntax: wivar <object> <ivarName> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbdebugcommands Py is implemented as FBWatchInstanceVariableCommand
xdebug
(lldb) help xdebug # Prints the debug description of the < element > element of the specified XCUIElement type in a human readable format # Expected raw input (see 'help raw input') Arguments: <element> # Type: XCUIElement* # XCUIElement element to print debug description Syntax: xdebug <element> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbxctestcommands Py is implemented as FBXCPrintDebugDescription
xnoid
(lldb) help xnoid # Print XCUIElement objects with labels but without identifiers # Expected raw input (see 'help raw input') Arguments: <element> # Type: XCUIElement* # XCUIElement element to start printing Options: --status-bar/-s # Print the item of status bar --pointer/-p # Print pointer --traits/-t # Print trait --frame/-f # Print frame Syntax: xnoid [--status-bar] [--pointer] [--traits] [--frame] <element> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbxctestcommands Py is implemented as FBXCNoId
xobject
(lldb) help xobject # Prints the details of the < element > element of the specified XCUIElement type # Expected raw input (see 'help raw input') Arguments: <element> # Type: XCUIElement* # XCUIElement element to print details Syntax: xobject <element> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbxctestcommands Py is implemented as FBXCPrintObject
xtree
(lldb) help xtree # Prints the subtree of the < element > element of the specified XCUIElement type # Expected raw input (see 'help raw input') Arguments: <element> # Type: XCUIElement* # XCUIElement element to print subtree Options: --pointer/-p # Print pointer --traits/-t # Print trait --frame/-f # Print frame Syntax: xtree [--pointer] [--traits] [--frame] <element> # This command is in / usr / local / cell / Chinese / 2.0.1/libexec/commands/fbxctestcommands Py is implemented as FBXCPrintTree
zzz
(lldb) help zzz # After the specified delay < delay in seconds >, execute the specified LLDB command < LLDB command > # Expected raw input (see 'help raw input') Arguments: <delay in seconds> # Type: float # Wait time before executing the specified command <lldb command> # Type: string # The LLDB command to execute after the specified delay Syntax: zzz <delay in seconds> <lldb command> # This command is in / usr / local / cell / chisel / 2.0.1/libexec/commands/FBDelay Py is implemented as FBDelay