Are you happy with your logging solution? Would you help us out by taking a 30-second survey? Click here


Chisel is a collection of LLDB commands to assist debugging iOS apps.

Subscribe to updates I use chisel

Statistics on chisel

Number of watchers on Github 6574
Number of open issues 37
Average time to close an issue about 1 month
Main language Python
Average time to merge a PR 14 days
Open pull requests 21+
Closed pull requests 12+
Last commit over 1 year ago
Repo Created over 5 years ago
Repo Last Updated over 1 year ago
Size 3.32 MB
Organization / Authorfacebook
Latest Release1.7.1
Page Updated
Do you use chisel? Leave a review!
View open issues (37)
View chisel activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating chisel for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)


Chisel is a collection of LLDB commands to assist in the debugging of iOS apps.

[InstallationCommandsCustom CommandsDevelopment Workflow ContributingLicense]

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


brew update
brew install chisel

if .lldbinit file doesn't exist you can create it & open it by tapping on the terminal

 touch .lldbinit 
 open .lldbinit 

Then add the following line to your ~/.lldbinit file.

# ~/.lldbinit
command script import /usr/local/opt/chisel/libexec/

Alternatively, download chisel and add the following line to your ~/.lldbinit file.

# ~/.lldbinit
command script import /path/to/

The commands will be available the next time Xcode starts.


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, or CGColorRef in 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.

(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 of the list will contain all of the commands sourced from Chisel.

You can also inspect a specific command by passing its name as an argument to the help command (as with all other LLDB commands).

(lldb) help border
Draws a border around <viewOrLayer>. Color and width can be optionally provided.

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

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

All of the commands provided by Chisel come with verbose help. Be sure to read it when in doubt!

Custom Commands

You can add local, custom commands. Here's a contrived example.

# Example file with custom commands, located at /magical/commands/

import lldb
import fblldbbase as fb

def lldbcommands():
  return [ PrintKeyWindowLevel() ]

class PrintKeyWindowLevel(fb.FBCommand):
  def name(self):
    return 'pkeywinlevel'

  def description(self):
    return 'An incredibly contrived command that prints the window level of the key window.'

  def run(self, arguments, options):
    # It's a good habit to explicitly cast the type of all return
    # values and arguments. LLDB can't always find them on its own.
    lldb.debugger.HandleCommand('p (CGFloat)[(id)[(id)[UIApplication sharedApplication] keyWindow] windowLevel]')

Then all that's left is to source the commands in lldbinit. Chisel has a python function just for this, loadCommandsInDirectory in the module.

# ~/.lldbinit
command script import /path/to/
script fblldb.loadCommandsInDirectory('/magical/commands/')

There's also builtin support to make it super easy to specify the arguments and options that a command takes. See the border and pinvocation commands for example use.

Development Workflow

Developing commands, whether for local use or contributing to Chisel directly, both follow the same workflow. Create a command as described in the Custom Commands section and then

  1. Start LLDB
  2. Reach a breakpoint (or simply pause execution via the pause button in Xcode's debug bar or process interrupt if attached directly)
  3. Execute command source ~/.lldbinit in LLDB to source the commands
  4. Run the command you are working on
  5. Modify the command
  6. Optionally run script reload(modulename)
  7. Repeat steps 3-6 until the command becomes a source of happiness


Please contribute any generic commands that you make. If it helps you then it will likely help many others! :D See to learn how to contribute.


Chisel is BSD-licensed. See LICENSE.

chisel open issues Ask a question     (View All Issues)
  • about 3 years Visualize command gives error: use of undeclared identifier 'CFTypeRef'
  • about 3 years Chisel improperly recognizing convenience vars
  • over 3 years CIImage should work on visualize command
  • over 3 years Use aliases where sensible
  • over 3 years Default argument values aren't language agnostic
  • over 3 years [Feature Request] Support for Finding AsyncDisplayKit Nodes
  • almost 4 years 2016: Command to list objects that reference a specific object
  • almost 4 years 2016: Command to list all objects of a specific class
  • about 4 years AppCode compatibility?
  • about 4 years add parameter to take window or window level for pvc
  • about 4 years make all commands work with remote debug sessions
  • about 4 years Add command to enable writing to const types
  • over 4 years is autocompletion of variables/methods possible?
  • over 4 years Feature idea: playout command, like pviews but just for layout
  • almost 5 years Break out a libChisel
  • about 5 years fb.evaluateIntegerExpression converting incorrectly to hex?
  • about 5 years Improve documentation
  • over 5 years Create test suite
chisel open pull requests (View All Pulls)
  • Added `pa11yi` to print accessibility identifiers of all views
  • Add C function to enumerate all live memory allocations
  • Add two commands pproperties, pblock
  • add two new Why commands
  • Better Handing of Integer Literals
  • Use register aliases
  • Add automatically generated change log file.
  • Introduce duplication function for Objective-C objects
  • Use Carthage for building
  • Rename e{objc,swift} to {objc,swift}e
  • Add present and dismiss commands for UIViewController
  • Expression refactor
  • Add class to recognize Objective-C objects in memory
  • [pinternals] -a option added
  • Evaluate visualize argument first thing
  • Add pivars command to
  • Update
  • Add open sandbox command
  • Added `xdebug`, `xtree`, `xobject` and `xnoid` commands
  • Support debugging information overlay
  • Add enable&disable breakpoints by rg-expression.
chisel questions on Stackoverflow (View All Questions)
  • Chisel poke() print format
  • Stack memory implementation not working properly in chisel for rocket chip
  • Recommended Java/Scala settings for Chisel
  • How do you make a transparent latch in Chisel?
  • How to delete useless registers generated by Chisel verilog backend?
  • Showing Chisel signals in VCD
  • Chisel Programming Error
  • Chisel switch statement doesn't appear to work in manner outlined in official tutorial
  • Rocket and Chisel - nothing happening in the emulator for assembler tests
  • Chisel SystemC Backend does not seem to recognize the Bits type within the object Decoupled
  • How to test the verilog module generated by Chisel in VCS ? How does work in chisel?
  • How to drive the reset of a module in Chisel?
  • Chisel adding enable to a register that has a next field
  • Conditional port in a Chisel Module
  • How to include clock in VCD file with Chisel?
  • Chisel: Access to Module Parameters from Tester
  • Adding uncore package to a Chisel project
  • What does Queue() function do in Chisel?
  • How to generate an asynchronous reset verilog always blocks with chisel
  • How can generate the 32-bit RISCV form chisel soure. What are the required modifications?
  • Installing chisel
  • What's the difference between Chisel and Lava and CLaSH?
  • Chisel tools installation; Unable to fint scct
  • Is the behavior of the chisel standard library shift register correct for the enable line
  • For loop is not unrolling in chisel
  • Should Chisel generate verilog testbench logic?
  • Chisel synchronous read memory
  • clk event in chisel/scala
  • wrap Verilog code in chisel
  • unresolved dependencies with chisel setup
chisel list of languages used
chisel latest release notes
1.7.1 XDebugCoin

This minor release fixes an issue with Chisel.xcodeproj (#218).

1.7.0 DebugCoin

This release adds a new command, findinstances, fixes a bug (#209), and adds installation documentation.


  • Add findinstances which finds object instances in memory, by type and filtered by predicate (@kastiglione, #197, #216)
  • Add a Chisel library (@kastiglione, #197)
  • Add a Makefile for installing Chisel's library (@keith, #214)
  • Improve the installation instructions in the README (@agisilaos, #199)
  • Fix bug that resulted in issues with Swift and pvc (@kastiglione, #209, #210)
1.6.0 Sweet One Six

This release includes new commands and bug fixes to existing commands. Thank you for all issues and pull requests! This also has some breaking changes, but hopefully they do make things better.


  • pinternals: Use -a flag to print object internals using _ivarDescription (@dmpv, #172)
  • rcomponents: Update ComponentKit debugging helper (@adamjernst, #178)
  • zzz: New command to run an lldb command after a delay (@zats, #179)
  • pa11y: Force start of accessibility server (@bartoszj , #189)
  • XCTest: Add new xdebug, xtree, xobject, and xnoid commands (@bartoszj, #192)

Plus, a few fixes to commands support Swift and iOS 11.

Other projects in Python