meta /chisel
Chisel is a collection of LLDB commands to assist debugging iOS apps.
★ 9,177⑂ 784👁 267⑃ 167● 142▤ 11
More from this author
+0
Daily
9,177
stars
784
forks
267
watchers
167
prs
142
issues
11
releases
README
Chisel Chisel is a collection of LLDB commands to assist in the debugging of iOS apps. [Installation • Commands • Custom Commands • Development Workflow Contributing • License] For a comprehensive overview of LLDB, and how Chisel complements it, read Ari Grant's Dancing in the Debugger — A Waltz with LLDB in issue 19 of objc.io. Installation shell brew update brew install chisel if .lldbinit file doesn't exist you can create it & open it by tapping on the terminal shell touch .lldbinit open .lldbinit Then add the following line to your ~/.lldbinit file. Python ~/.lldbinit ... command script import /usr/local/opt/chisel/libexec/fbchisellldb.py Note that if you are installing on an M1 Mac, the path above should be /opt/homebrew/opt/chisel/libexec/fbchisellldb.py instead. Alternatively, download chisel and add the following line to your _~/.lldbinit_ file. Python ~/.lldbinit ... command script import /path/to/fbchisellldb.py The commands will be available the next time Xcode starts. Commands There are many commands; here's a few: (Compatibility with iOS/Mac indicated at right) |Command |Description |iOS |OS X | |-----------------|----------------|-------|-------| |pviews |Print the recursive view description for the key window.|Yes|Yes| |pvc |Print the recursive view controller description for the key window.|Yes|No| |visualize |Open a UIImage, CGImageRef, UIView, CALayer, NSData (of an image), UIColor, CIColor, CIImage, CGColorRef or CVPixelBuffer in Preview.app on your Mac.|Yes|No| |fv |Find a view in the hierarchy whose class name matches the provided regex.|Yes|No| |fvc |Find a view controller in the hierarchy whose class name matches the provided regex.|Yes|No| |show/hide |Show or hide the given view or layer. You don't even have to continue the process to see the changes!|Yes|Yes| |mask/unmask |Overlay a view or layer with a transparent rectangle to visualize where it is.|Yes|No| |border/unborder |Add a border to a view or layer to visualize where it is.|Yes|Yes| |caflush |Flush the render server (equivalent to a "repaint" if no animations are in-flight).|Yes|Yes| |bmessage |Set a symbolic breakpoint on the method of a class or the method of an instance without worrying which class in the hierarchy actually implements the method.|Yes|Yes| |wivar |Set a watchpoint on an instance variable of an object.|Yes|Yes| |presponder |Print the responder chain starting from the given object.|Yes|Yes| |... |... and many more!| To see the list of all of the commands execute the help command in LLDB or go to the Wiki. Python (lldb) help The following is a list of built-in, permanent debugger commands: ... The following is a list of your current user-defined commands: ... The bottom list contains all the commands sourced from Chisel. You can also inspect a specific command by
Top issues
#227pjson not returning expected value with Swift10 comments · 2018-01-30#277pjson not show Chinese8 comments · 2019-10-24#288taplog error in ios145 comments · 2020-09-29#261AttributeError: FBPrintViewHierarchyCommand instance has no attribute 'lex'5 comments · 2019-04-08#48Improve documentation5 comments · 2014-09-05#256Can't use command on iOS12?4 comments · 2019-03-11#213pvc error4 comments · 2017-12-06#84is autocompletion of variables/methods possible?4 comments · 2015-03-26
Latest release
Renames, Ranges, and the Copy Command 2.0.1 2020-08-17Pushing a minor release to fix a Python 3 issue (d5f155d) as well as to sync brew with latest naming convention (deb751e). Fixes: - Replace xrange with range to fix Python 3 issue (d5f155d) - thanks to @kastiglione! - Renaming all fblldb to fbioslldb to avoid conflict with lldb (deb751e) - thanks to @aadsm New Features: - New copy command that can be used to copy any NSURL or NSData to the host machine (0c9ee31) - awesome new tool by Chris Ellsworth. - visualize now supports CVPixelBuffer without any boilerplate - thanks again to Chris Ellsworth.