8000 Home · iT-Boyer/chisel Wiki · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
布衣男儿 edited this page Jun 23, 2017 · 15 revisions

安装:

  1. brew update
  2. brew install chisel

如果已经安装,可更新最新版本 brew upgrade chisel

安装目录:

/usr/local/opt/chisel/libexec/fblldb.py

新建~/.lldbinit文件

#目录路径
chiselDir=`pwd`/Util/chisel/fblldb.py
command=<
8000
span class="pl-s">"command script import $chiselDir"
echo $command >> ~/.lldbinit

命令行


alamborder

Put a border around views with an ambiguous layout

选项:
--color/-c <color>;

类型:string; A color name such as 'red', 'green', 'magenta', etc. --width/-w <width>;

类型:CGFloat; Desired width of border.

语法: alamborder [--color=color] [--width=width]

alamunborder

Removes the border around views with an ambiguous layout

语法: 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.
设置当前正在运行的框架/库中的相对地址的断点。这样做的工作找到的框架/库的偏移量,并相应地滑动您的地址。

参数:
<address>;

类型:string; Address within the currently running framework to set a breakpoint on.

语法: 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.
设置类的选择器的断点,即使类本身不覆盖该选择器。它走层次结构,直到它找到一个类,实现了选择器,并设置有条件断点。

参数:
<expression>;

类型:string; Expression to set a breakpoint on, e.g. "-[MyView setFrame:]", "+[MyView awesomeClassMethod]" or "-[0xabcd1234 setFrame:]"

语法: bmessage <expression>

border

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

参数:
<viewOrLayer>;

类型:UIView/NSView/CALayer *; The view/layer to border. NSViews must be layer-backed.

选项:
--color/-c <color>;

类型:string;

A color name such as 'red', 'green', 'magenta', etc. --width/-w <width>;

类型:CGFloat; Desired width of border.

语法: border [--color=color] [--width=width] <viewOrLayer>

caflush

Force Core Animation to flush. This will 'repaint' the UI but also may mess with ongoing animations.
强制核心动画刷新。这将重新绘制的UI还可以把正在进行的动作。

语法: caflush

fa11y

Find the views whose accessibility labels match labelRegex and puts the address of the first result on the clipboard.
发现意见的可达性标签匹配labelregex提出的第一个结果的地址在剪贴板上。

参数:
<labelRegex>;

类型:string; The accessibility label regex to search the view hierarchy for.
可达性标签的正则表达式搜索视图层次结构。

语法: fa11y <labelRegex>

flicker

Quickly show and hide a view to quickly help visualize where it is.
快速显示和隐藏一个视图,快速帮助可视化它在哪里。

参数:
<viewOrLayer>;

类型:UIView/NSView*; The view to flicker.

语法: flicker <viewOrLayer>

fv

Find the views whose class names match classNameRegex and puts the address of first on the clipboard.
通过类名搜索当前内存中存在的view和viewController实例,支持正则搜索

参数:
<classNameRegex>;

类型:string; The view-class regex to search the view hierarchy for.

语法: fv <classNameRegex>

fvc

Find the view controllers whose class names match classNameRegex and puts the address of first on the clipboard.
通过类名搜索当前内存中存在的view和viewController实例,支持正则搜索

选项:
--name/-n <classNameRegex>;

类型:string; The view-controller-class regex to search the view controller hierarchy for. --view/-v <view>;

类型:UIView; This function will print the View Controller that owns this view.

语法: fvc [--name=classNameRegex] [--view=view]

hide

Hide a view or layer. 隐藏一个指定的 UIView 或 层 参数:
<viewOrLayer>;

类型:UIView/NSView/CALayer *; The view/layer to hide.

语法: hide <viewOrLayer>
(lldb) show self.view (lldb) hide self.view

也可以使用内存地址隐藏和现实view,比如通过 fv cate找到一个view后使用hide隐藏它 (lldb)fv cate 0x7fd5b6e06920 AlbumCategoryView (lldb) hide 0x7fd5b6e06920

mask

Add a transparent rectangle to the window to reveal a possibly obscured or hidden view or layer's bounds
向窗口添加透明矩形,以显示可能隐藏或隐藏的视图或图层的边界

参数:
<viewOrLayer>;

类型:UIView/NSView/CALayer *; The view/layer to mask.

选项:
--color/-c <color>;

类型:string; A color name such as 'red', 'green', 'magenta', etc. --alpha/-a <alpha>;

类型:CGFloat; Desired alpha of mask.

语法: mask [--color=color] [--alpha=alpha] <viewOrLayer>

paltrace

Print the Auto Layout trace for the given view. Defaults to the key window.
打印给定视图的自动布局跟踪。默认是key window

参数:
<view>;

类型:UIView *; The view to print the Auto Layout trace for.

语法: paltrace <view>

panim

Prints if the code is currently execution with a UIView animation block.
代码打印操作:当一个UIView动画块执行时。

语法: panim

pca

Print layer tree from the perspective of the render server.
从渲染服务器的角度打印图层树。

语法: pca

pcells

Print the visible cells of the highest table view in the hierarchy.
在视图结构中,打印tableView中可见cell。

语法: pcells

pclass

Print the inheritance starting from an instance of any class.
从任何类的实例打印继承。

参数:
<object>;

类型:id; The instance to examine.

语法: pclass <object>

pinternals

Show the internals of an object by dereferencing it as a pointer.
通过引用它的指针显示一个物体的内部。

参数:
<object>;

类型:id; Object expression to be evaluated.

语法: 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. 可惜的是,目前仅在x86上实现。

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

语法: pinvocation [--all]

pivar

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

参数:
<object>;

类型:id; Object expression to be evaluated. <ivarName>;

类型:; Name of instance variable to print.

语法: pivar <object> <ivarName>

pkp

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

参数:
<keypath>;

类型:NSString *; The keypath to print

语法: pkp <keypath>

presponder

Print the responder chain starting from a specific responder.

参数:
<startResponder>;

类型:UIResponder *; The responder to use to start walking the chain.

语法: presponder <startResponder>

ptv

Print the highest table view in the hierarchy.

语法: ptv

pvc

Print the recursion description of <aViewController>.
打印viewController控制器层级结构。

参数:
<aViewController>;

类型:UIViewController*; The view controller to print the description of.

语法: pvc <aViewController>

(lldb) pvc self.mMDrawerController**
<MMDrawerController: 0x7fd5b658b8c0; 
view = <UIView; 0x7fd5b658cd00>;  frame = (0, 0; 375,     667)>
| <SampleAlbumListVC: 0x7fd5b658bc90;
view = <UIView; 0x7fd5b66be7a0>;  frame = (0, 0; 375, 667)>
| <SlideMenuVC: 0x7fd5b6589b50; 
view = <UIView; 0x7fd5b684f790>;   frame = (inf, inf; 0, 0)>

pviews

Print the recursion description of <aView>. 打印视图的层级结构:

Arguments 参数:
<a 8000 View>;

类型: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>;

类型:int; Print only to a given depth. 0 indicates infinite depth.

语法: pviews [--up] [--depth=depth] <aView>

(lldb) pviews self.window
|<UIWindow: 0x7fd5b6816780;
frame = (0 0;
375 667);

gestureRecognizers = <NSArray: 0x7fd5b6817770>;

layer = <UIWindowLayer: 0x7fd5b68263f0>>
| <UILayoutContainerView: 0x7fd5b6941780;

frame = (0 0;
375 667);
autoresize = W+H;
gestureRecognizers = <NSArray: 0x7fd5b694fc10>;
layer = <CALayer: 0x7fd5b6931250>>
| <UINavigationTransitionView: 0x7fd5b6949620;
frame = (0 0;
375 667);
clipsToBounds = YES;

autoresize = W+H;

layer = <CALayer: 0x7fd5b6946e20>>

show

Show a view or layer.
显示和隐藏一个指定的 UIView

参数:
<viewOrLayer>;

类型:UIView/NSView/CALayer *; The view/layer to show.

语法: show <viewOrLayer>

taplog

Log tapped view to the console.

语法: taplog

unborder

Removes border around <viewOrLayer>.

参数:
<viewOrLayer>;

类型:UIView/NSView/CALayer *; The view/layer to unborder.

语法: unborder <viewOrLayer>

unmask

Remove mask from a view or layer

参数:
<viewOrLayer>;

类型:UIView/CALayer *; The view/layer to mask.

语法: unmask <viewOrLayer>

visualize

Open a UIImage, CGImageRef, UIView, or CALayer in Preview.app on your Mac.
使用预览.app打开:UImageView CGImageRef UIView CALayer

参数:
<target>;

类型:(id); The object to visualize.

语法: visualize <target>

visualize uiimageview

vs

Interactively search for a view by walking the hierarchy.

参数:
<view>;

类型:UIView*; The view to border.

语法: vs <view>

wivar

Set a watchpoint for an object's instance variable.

参数:
<object>;

类型:id; Object expression to be evaluated. <ivarName>;

类型:; Name of the instance variable to watch.

语法: wivar <object> <ivarName>

0