让LLDB效率倍增–Chisel

Chisel

Chisel是Facebook写的LLDB的指令集合,是个Python脚本库,功能十分强大。

安装

brew update
brew install chisel

安装完成后:
如果是homebrew安装的,运行brew info chisel获取chisel版本号(如1.5.0)
然后

echo  command script import /usr/local/Cellar/chisel/1.5.0/libexec/fblldb.py >> ~/.lldbinit

运行

pviews 打印视图结构
presponder 地址 打印响应者链条
pinternals 地址 打印对象详细属性
bmessage -[NSViewController viewDidLoad] 根据方法名称下断点
wivar 0x7f999bde0ba0 _subviews 添加一个观察断点
可以使用 help 命令查看其它指令的使用

参考链接:
让LLDB效率倍增–Python脚本–Chisel

你可能感兴趣的:(让LLDB效率倍增–Chisel)