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

Related tags

Debugging chisel
Overview

Chisel

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 objc.io.

Installation

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/fbchisellldb.py

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

# ~/.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, or CGColorRef 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.

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

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

Options:
  --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.

#!/usr/bin/python
# Example file with custom commands, located at /magical/commands/example.py

import lldb
import fbchisellldbbase 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 fbobjclldb.py module.

# ~/.lldbinit
...
command script import /path/to/fbobjclldb.py
script fbobjclldb.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

Contributing

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

License

Chisel is MIT-licensed. See LICENSE.

Comments
  • Implement findinstances command

    Implement findinstances command

    This pull requests adds the findinstances command, which completes the work from #197 and #214.

    For details on findinstances users can run help findinstances. The brief summary is that findinstances can find all instances of a given class or protocol, and can filter those results, using a predicate expression.

    If you had a class named XXSocialUser, then you could for example find a specific user by running findinstances XXSocialUser username == 'curry'.

    CLA Signed 
    opened by kastiglione 26
  • Chisel fails to build with macOS 10.14 SDK

    Chisel fails to build with macOS 10.14 SDK

    Chisel 1.8.0 currently fails to build on Mojave and High Sierra, with Xcode 10 (and the 10.14 SDK). After many warnings, errors include:

    In file included from /tmp/chisel-20180928-42966-1s1v8ad/chisel-1.8.0/Chisel/Chisel/CHLObjcInstances.mm:5:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:85:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLCredential.h:9:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.h:35:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/SecImportExport.h:41:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/SecKeychain.h:33:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/cssmapple.h:35:
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/certextensions.h:126:2: error: 'CSSM_OID' is unavailable: not available on iOS
            CSSM_OID                                typeId;
            ^
    In file included from /tmp/chisel-20180928-42966-1s1v8ad/chisel-1.8.0/Chisel/Chisel/CHLObjcInstances.mm:5:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:85:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLCredential.h:9:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.h:35:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/SecImportExport.h:41:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/SecKeychain.h:33:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/cssmapple.h:35:
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/certextensions.h:127:2: error: 'CSSM_DATA' is unavailable: not available on iOS
            CSSM_DATA                               value;          // unparsed, BER-encoded
            ^
    In file included from /tmp/chisel-20180928-42966-1s1v8ad/chisel-1.8.0/Chisel/Chisel/CHLObjcInstances.mm:5:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:85:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLCredential.h:9:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.h:35:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/SecImportExport.h:41:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/SecKeychain.h:33:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/cssmapple.h:35:
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/certextensions.h:138:2: error: 'CE_GeneralName' is unavailable: not available on iOS
            CE_GeneralName                  *generalName;
            ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/certextensions.h:134:3: note: 'CE_GeneralName' has been explicitly marked unavailable here
    } CE_GeneralName DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
      ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/certextensions.h:176:2: error: 'CSSM_DATA' is unavailable: not available on iOS
            CSSM_DATA                       keyIdentifier;
            ^
    In file included from /tmp/chisel-20180928-42966-1s1v8ad/chisel-1.8.0/Chisel/Chisel/CHLObjcInstances.mm:5:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:85:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLCredential.h:9:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.h:35:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/SecImportExport.h:41:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/SecKeychain.h:33:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/cssmapple.h:35:
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/certextensions.h:316:2: error: 'CSSM_OID_PTR' is unavailable: not available on iOS
            CSSM_OID_PTR    purposes;               // in Intel pre-encoded format
            ^
    In file included from /tmp/chisel-20180928-42966-1s1v8ad/chisel-1.8.0/Chisel/Chisel/CHLObjcInstances.mm:5:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:85:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLCredential.h:9:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.h:35:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/SecImportExport.h:41:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/SecKeychain.h:33:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/cssmapple.h:35:
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/certextensions.h:473:2: error: 'CE_PolicyQualifierInfo' is unavailable: not available on iOS
            CE_PolicyQualifierInfo  *policyQualifiers;
            ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/certextensions.h:468:3: note: 'CE_PolicyQualifierInfo' has been explicitly marked unavailable here
    } CE_PolicyQualifierInfo DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
      ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/certextensions.h:478:2: error: 'CE_PolicyInformation' is unavailable: not available on iOS
            CE_PolicyInformation    *policies;
            ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/certextensions.h:474:3: note: 'CE_PolicyInformation' has been explicitly marked unavailable here
    } CE_PolicyInformation DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
      ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/certextensions.h:546:2: error: 'CE_CrlDistributionPointNameType' is unavailable: not available on iOS
            CE_CrlDistributionPointNameType         nameType;
            ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/certextensions.h:543:3: note: 'CE_CrlDistributionPointNameType' has been explicitly marked unavailable here
    } CE_CrlDistributionPointNameType DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
      ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/certextensions.h:548:3: error: 'CE_GeneralNames' is unavailable: not available on iOS
                    CE_GeneralNames                                 *fullName;
                    ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/certextensions.h:139:3: note: 'CE_GeneralNames' has been explicitly marked unavailable here
    } CE_GeneralNames DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
      ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/certextensions.h:549:3: error: 'CSSM_X509_RDN_PTR' is unavailable: not available on iOS
                    CSSM_X509_RDN_PTR                               rdn;
                    ^
    In file included from /tmp/chisel-20180928-42966-1s1v8ad/chisel-1.8.0/Chisel/Chisel/CHLObjcInstances.mm:5:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:85:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLCredential.h:9:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.h:35:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/SecImportExport.h:41:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/SecKeychain.h:33:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/cssmapple.h:35:
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/certextensions.h:558:2: error: 'CE_DistributionPointName' is unavailable: not available on iOS
            CE_DistributionPointName                        *distPointName;
            ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/certextensions.h:551:3: note: 'CE_DistributionPointName' has been explicitly marked unavailable here
    } CE_DistributionPointName DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
      ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/certextensions.h:560:2: error: 'CE_CrlDistReasonFlags' is unavailable: not available on iOS
            CE_CrlDistReasonFlags                           reasons;
            ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/certextensions.h:530:15: note: 'CE_CrlDistReasonFlags' has been explicitly marked unavailable here
    typedef uint8 CE_CrlDistReasonFlags DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
                  ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/certextensions.h:561:2: error: 'CE_GeneralNames' is unavailable: not available on iOS
            CE_GeneralNames                                         *crlIssuer;
            ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/certextensions.h:139:3: note: 'CE_GeneralNames' has been explicitly marked unavailable here
    } CE_GeneralNames DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
      ^
    fatal error: too many errors emitted, stopping now [-ferror-limit=]
    
    opened by fxcoudert 20
  • AppCode compatibility?

    AppCode compatibility?

    Is this intended to work/already works in AppCode?

    I've installed as per the instructions and have chisel commands (pviews, visualize, etc...) working in Xcode.

    Issuing "help" in lldb within AppCode displays the chisel commands. However, I don't see any results in AppCode from issuing commands (pviews, visualize, etc...) . Other non-chisel commands, even 3rd party additions, work.

    I generally assume issues like these are my own fault somehow, but it would be reassuring to know if these commands work for others within AppCode.

    Thanks!

    opened by dxclancy 19
  • Ability to visualize colors

    Ability to visualize colors

    If I run visualize someColor, I get:

    UIDeviceRGBColor isn't supported. You can visualize UIImage, CGImageRef, UIView, CALayer or NSData.
    

    Chisel should generate a square or circular image of the color, optionally with some RGB/hex info included in the image, and open the image in Preview.

    opened by ZevEisenberg 18
  • Issues running in Swift

    Issues running in Swift

    I am getting errors because my expressions are running in Swift despite the evaluateExpressionValueInFrameLanguage function

    Typical error statement:

    error: expected ',' separator (int)((BOOL)((unsigned long)CFGetTypeID((CFTypeRef)(shape)) == (unsigned long)CGImageGetTypeID()))

    Is there something I'm missing here? I'm just calling visualize <value>

    bug 
    opened by nickkjordan 17
  • Add two commands pproperties, pblock

    Add two commands pproperties, pblock

    pproperties can print the properties of an instance of Class.

    (lldb) ppro self
    @property (nonatomic, assign, readonly) NSString * helo;
    @property (nonatomic, strong) NSNumber * number;
    

    pblock can print the implementation address and signature of a block.

    (lldb) pbl block
    Imp: 0x101180980    Signature: void ^(NSString *);
    
    CLA Signed 
    opened by longv2go 16
  • add two commands pclassmethod and  pinstancemethod

    add two commands pclassmethod and pinstancemethod

    This command show the class`s methods in a pretty way.

    Options: --address/-a ; Print the implementation address of the method --instance/-i ; Print the instance methods --class/-c ; Print the class methods

    You can get the runtime address of the method use option '-a' then do something more with that address, such as run lldb command "dis -a " to disassemble the method.

    Examples:

    (lldb) pme -a self
    Class Methods:
    No instance methods were found.
    
    Instance Methods:
    - (void)outAction:(id)arg0  0x000ee680
    - (void)innerAction:(id)arg0  0x000ee6f0
    - (void)inges:(id)arg0  0x000ee760
    - (void)underGes:(id)arg0  0x000ee7d0
    ......
    
    CLA Signed 
    opened by longv2go 16
  • Xcode11 error: module importing failed: Missing parentheses in call to 'print'

    Xcode11 error: module importing failed: Missing parentheses in call to 'print'

    error: 'pviews' is not a valid command. error: module importing failed: Missing parentheses in call to 'print'. Did you mean print('Whoops! You are missing the <' + arg.argName + '> argument.')? (fblldb.py, line 98) File "temp.py", line 1, in

    opened by ceekay1991 14
  • Break out a libChisel

    Break out a libChisel

    I mentioned this in a recent comment, but I'd like to get more feedback on this idea.

    Many of the commands end up marshaling a bunch of expressions back and forth between LLDB's python interpreter and the target app, but this has proven to be slowish at times. For example the manual path pvc is a fair bit slower than the path that uses +[UIViewController _printHierarchy].

    I believe there could be a solid usability and maintainability improvement if we divided the architecture into two halves:

    1. Code that interacts with LLDB's interfaces.
    2. Code that interacts with the app's objects and data.

    I think we could bundle a dynamic library and have Chisel load that into the app via ~~target modules add~~process load. This adds some complexity, but the benefits would be faster interaction & feedback with Chisel commands, and also I think this would smooth the path toward adding testing to the project. Plus not having to write objc encoded in python strings is an improvement.

    cc @arigrant @mattjgalloway @mmmulani @dstnbrkr @KingOfBrian @kolinkrewinkel

    opened by kastiglione 13
  • Enabled visualize command to work on devices

    Enabled visualize command to work on devices

    This is an improved version of #18 by @bencochran. (It looked like he’s not available to work on it further for now, so I decided to do it). Now both local and remote images are saved to disk using one method, by reading memory from process. What do you think?

    opened by antons 13
  • border <view> not working on osx

    border not working on osx

    i have an NSView* view and i try to border it but i get this. (lldb) border view error: use of undeclared identifier 'UIColor' error: 1 errors parsing expression

    opened by pvinis 12
  • There is no fbobjclldb.py module which is mentioned in the README.md

    There is no fbobjclldb.py module which is mentioned in the README.md

    In Custom Command, "Chisel has a python function just for this, loadCommandsInDirectory in the fbobjclldb.py module." Actually, the name of the module is fbchisellldb.py or fblldb.py.

    opened by Liiiszt 0
  • Failed applying an ad-hoc signature to xxx

    Failed applying an ad-hoc signature to xxx

    Hello, I met a problem while installing the Chisel. My MacOS system is Monterey and my chip is M1 Max。

    the Error infos like this:

    ==> Reinstalling chisel ==> Pouring chisel--2.0.1.arm64_big_sur.bottle.tar.gz Error: Failed applying an ad-hoc signature to /opt/homebrew/Cellar/chisel/2.0.1/lib/Chisel.framework/Chisel.

    Is there any methods to fix this problem? thanks!

    opened by shaqima123 1
  • [Xcode 13] LLDB RPC server has crashed

    [Xcode 13] LLDB RPC server has crashed

    I've discovered that Chisel seems to be crashing LLDB in Xcode 13 when running unit tests.

    • Chisel 2.0.1
    • macOS Version 12.0.1 (Build 21A559)
    • Xcode 13.1 (19466) (Build 13A1030d)

    When I remove the chisel import from my ~/.lldbinit, the crash no longer occurs.

    Xcode displays an error alert with the following message:

    The LLDB RPC server has crashed. You may need to manually terminate your process. The crash log is located in ~/Library/Logs/DiagnosticReports and has a prefix 'lldb-rpc-server'. Please file a bug and attach the most recent crash log.

    Clicking to view more details displays:

    Could not launch “<TEST TARGET NAME>”
    Domain: IDEDebugSessionErrorDomain
    Code: 3
    Failure Reason: The LLDB RPC server has crashed. You may need to manually terminate your process. The crash log is located in ~/Library/Logs/DiagnosticReports and has a prefix 'lldb-rpc-server'. Please file a bug and attach the most recent crash log.
    User Info: {
        DVTRadarComponentKey = 855031;
        IDERunOperationFailingWorker = DBGLLDBLauncher;
        RawUnderlyingErrorMessage = "The LLDB RPC server has crashed. You may need to manually terminate your process. The crash log is located in ~/Library/Logs/DiagnosticReports and has a prefix 'lldb-rpc-server'. Please file a bug and attach the most recent crash log.";
    }
    --
    
    Analytics Event: com.apple.dt.IDERunOperationWorkerFinished : {
        "device_model" = "MacBookPro16,2";
        "device_osBuild" = "12.0.1 (21A559)";
        "device_platform" = "com.apple.platform.macosx";
        "launchSession_schemeCommand" = Test;
        "launchSession_state" = 1;
        "launchSession_targetArch" = "x86_64";
        "operation_duration_ms" = 92;
        "operation_errorCode" = 3;
        "operation_errorDomain" = IDEDebugSessionErrorDomain;
        "operation_errorWorker" = DBGLLDBLauncher;
        "operation_name" = IDERunOperationWorkerGroup;
        "param_consoleMode" = 0;
        "param_debugger_attachToExtensions" = 0;
        "param_debugger_attachToXPC" = 1;
        "param_debugger_type" = 3;
        "param_destination_isProxy" = 0;
        "param_destination_platform" = "com.apple.platform.macosx";
        "param_diag_MainThreadChecker_stopOnIssue" = 0;
        "param_diag_MallocStackLogging_enableDuringAttach" = 0;
        "param_diag_MallocStackLogging_enableForXPC" = 0;
        "param_diag_allowLocationSimulation" = 1;
        "param_diag_gpu_frameCapture_enable" = 3;
        "param_diag_gpu_shaderValidation_enable" = 0;
        "param_diag_gpu_validation_enable" = 1;
        "param_diag_memoryGraphOnResourceException" = 0;
        "param_diag_queueDebugging_enable" = 1;
        "param_diag_runtimeProfile_generate" = 1;
        "param_diag_sanitizer_asan_enable" = 0;
        "param_diag_sanitizer_tsan_enable" = 0;
        "param_diag_sanitizer_tsan_stopOnIssue" = 0;
        "param_diag_sanitizer_ubsan_stopOnIssue" = 0;
        "param_diag_showNonLocalizedStrings" = 0;
        "param_diag_viewDebugging_enabled" = 1;
        "param_diag_viewDebugging_insertDylibOnLaunch" = 0;
        "param_install_style" = 0;
        "param_launcher_UID" = 2;
        "param_launcher_allowDeviceSensorReplayData" = 0;
        "param_launcher_kind" = 0;
        "param_launcher_style" = 0;
        "param_launcher_substyle" = 0;
        "param_runnable_appExtensionHostRunMode" = 0;
        "param_runnable_productType" = "com.apple.product-type.tool";
        "param_runnable_type" = 1;
        "param_testing_launchedForTesting" = 1;
        "param_testing_suppressSimulatorApp" = 0;
        "param_testing_usingCLI" = 0;
        "sdk_canonicalName" = "macosx12.0";
        "sdk_osVersion" = "12.0";
        "sdk_variant" = macos;
    }
    
    opened by jessesquires 1
  • CG_CONTEXT_SHOW_BACKTRACE required?

    CG_CONTEXT_SHOW_BACKTRACE required?

    I breakpoint in my code and tried to do a visualize subview

    I get this:

    error: error: Execution was interrupted, reason: step over.
    The process has been returned to the state before expression evaluation.
    2021-11-08 16:31:52.610210+0000 MyApp[68056:11076538] [Unknown process name] CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
    2021-11-08 16:31:52.610799+0000 MyApp[68056:11076538] [Unknown process name] CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
    2021-11-08 16:31:52.611133+0000 MyApp[68056:11076538] [Unknown process name] CGContextGetBaseCTM: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
    2021-11-08 16:31:52.611304+0000 MyApp[68056:11076538] [Unknown process name] CGContextConcatCTM: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
    2021-11-08 16:31:52.611415+0000 MyApp[68056:11076538] [Unknown process name] CGContextSetBaseCTM: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
    2021-11-08 16:31:52.611527+0000 MyApp[68056:11076538] [Unknown process name] CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
    error: error: Execution was interrupted, reason: step over.
    The process has been returned to the state before expression evaluation.
    Could not get image data.
    error: error: Execution was interrupted, reason: step over.
    The process has been returned to the state before expression evaluation.
    error: error: Execution was interrupted, reason: step over.
    The process has been returned to the state before expression evaluation.
    error: error: Execution was interrupted, reason: step over.
    The process has been returned to the state before expression evaluation.
    
    opened by CyberMew 0
Releases(2.0.1)
  • 2.0.1(Aug 17, 2020)

    Pushing 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.
    Source code(tar.gz)
    Source code(zip)
  • 2.0.0(Feb 19, 2020)

    • Python 3 support (#272 / #266) - huge thank you to @liuliu!
    • Add 'uikit' command to import UIKit (#258) - thanks @logicxd
    • Fixes for the sequence command - thanks @kastiglione
    • Removal of pca command - @kastiglione
    • Update the license (to MIT), copyright, and add a Code of Conduct
    Source code(tar.gz)
    Source code(zip)
  • 1.8.1(Oct 12, 2018)

    Minor release. Primary changes are:

    • Use Legacy build system to fix Mojave builds (@kastiglione, #251)
    • Add macOS build (@kastiglione, #247)
    • Fix issue with visualize (@kastiglione, #244)
    • Added pviews --window flag to show UIWindows (@PeteTheHeat, #239)
    • Add support for printing json format for Swift Dictionaries and Arrays (@arorajatin, #238)
    • Fixed fa11y command on iOS 10 and higher (@bartoszj, #237)
    Source code(tar.gz)
    Source code(zip)
  • 1.8.0(Mar 12, 2018)

    This release adds new commands benable & bdisable, sequence, and heapfrom, as well as bug fixes.

    New Commands

    • Add benable & bdisable commands, providing convenient ability to control which breakpoints are enabled @sunbohong #230
    • Add sequence command which is a simple but sometimes quite useful command to combine lldb commands @kastiglione #233
    • Add heapfrom command which identifies heap pointers within a data structure @kastiglione #235

    Fixes

    • findinstances accepts classes with and without module prefixes @kastiglione #219
    • findinstances quote handling was fixed @kastiglione #224
    • Made more commands work when used from Swift @kastiglione #228
    • paltrace now also works on specific views @kastiglione #231
    • Handle certain kinds of expression failures, to improve Swift compatibility @kastiglione #232

    Plus other smaller fixes, see: https://github.com/facebook/chisel/compare/1.7.1...1.8.0

    Source code(tar.gz)
    Source code(zip)
  • 1.7.1(Jan 5, 2018)

  • 1.7.0(Jan 4, 2018)

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

    Updates

    • 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)
    Source code(tar.gz)
    Source code(zip)
  • 1.6.0(Nov 7, 2017)

    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.

    Updates

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

    Source code(tar.gz)
    Source code(zip)
  • 1.5.0(Aug 29, 2016)

    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.

    Breaking changes

    • Removed the various objc/swift commands (pobjc, pswift, poswift, eobjc, eswift) – Chisel now attempts to evaluate with the correct language based on context (@kastiglione, #156)

    New commands

    • pa11yi: Print accessibility identifiers of views (@bartoszj, #140)
    • pproperties: Print properties of an object (@longv2go, #133)
    • pblock: Print the implementation address and signature of a block (@longv2go, #133)
    • settext: Set text on a view (by accessibility id) (@tecknut, #137)
    • setinput: Populate first responder text fields/ text views (@tecknut, #137)
    • pbcopy: Print object to clipboard (@MDSilber, #147)
    • pbundlepath: Print application's bundle directory path (@Ashton-W, #152)
    • present, dismiss: Present and dismiss view controllers (@alanzeino, #150)

    Improvements

    • Show help text for all Chisel commands (@kastiglione, #154)

    As always, help is your friend.

    Source code(tar.gz)
    Source code(zip)
  • 1.4.0(Feb 10, 2016)

    This release includes new commands and bug fixes to existing commands. Thank you for all issues and pull requests!

    New and updated commands:

    • mwarning: Trigger simulated memory warnings (@lianchengjiang, #131)
    • pmethods: Print methods on an object or class (@longv2go, #113)
    • border: Added --depth option (@eithanshavit, #126)

    Improvements

    • Fixed presponder on OS X (@kolinkrewinkel, #134)
    • Fixed README (@JuIioCesar, #129)
    • Fixed pa11y and fa11y for iOS 8+ (@gkassabli, #128)
    • Fixed commands to work in Swift (@ultramiraculous, #121)
    • Added human friendly error messages to visualize (@jbinney, #125)

    As always, help is your friend.

    Source code(tar.gz)
    Source code(zip)
  • 1.3.0(Oct 12, 2015)

    This release includes new commands and bug fixes to existing commands. Read on for most of the details.

    Thank you for all bug reports and contributions!

    New commands:

    • pdocspath: Print path Documents directory (@dopcn, #72)
    • pactions: Print targets and actions of a control (@kastiglione, #92)
    • pcurl: Print an NSURLRequest as a curl command (@VTopoliuk, #109)
    • pjson: Print arrays and dictionaries in JSON format (@alexch2000, #111)

    Improvements

    • Fixed vs command (@palcalde, #95)
    • Added color support to visualize (@ZevEisenberg, #104)
    • Fixed wivar command (@idrisr, #117)

    Plus other fixes and improvements.

    As always, help <command> is your friend.

    Source code(tar.gz)
    Source code(zip)
  • 1.2.0(Mar 28, 2015)

    Many new commands, support for OS X, and some initial Swift support.

    Thank you to all the contributors!

    New commands:

    • paltrace: Print Auto Layout Trace
    • alamborder (alamunborder): Draw border around views with Ambiguous Auto Layout
    • binside: Breakpoint using address relative to library/framework
    • pkp: Print value using an object.keyPath expression
    • slowanim (unslowanim): Cause animations to run slowly
    • pa11y / fa11y: Print and find views by accessibility label
    • pdata: Print NSData as text, with support for the main encodings
    • pcomponents / dcomponents / rcomponents: Tools to aide building your ComponentKit app

    As always, help <command> is your friend.

    Plus many fixes and improvements.

    Source code(tar.gz)
    Source code(zip)
Owner
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
Facebook
Network debugging made easy,This network debugging tool is developed based on the swift version of Wormholy.

Start debugging iOS network calls like a wizard, without extra code! Wormholy makes debugging quick and reliable. What you can do: No code to write an

null 21 Dec 14, 2022
A collection of tools for debugging, diffing, and testing your application's data structures.

Custom Dump A collection of tools for debugging, diffing, and testing your application's data structures. Motivation customDump diff XCTAssertNoDiffer

Point-Free 631 Jan 3, 2023
A lightweight, one line setup, iOS / OSX network debugging library! 🦊

Netfox provides a quick look on all executed network requests performed by your iOS or OSX app. It grabs all requests - of course yours, requests from

Christos Kasketis 3.4k Dec 28, 2022
Remote network and data debugging for your native iOS app using Chrome Developer Tools

PonyDebugger PonyDebugger is a remote debugging toolset. It is a client library and gateway server combination that uses Chrome Developer Tools on you

Square 5.9k Dec 24, 2022
Set of easy to use debugging tools for iOS developers & QA engineers.

DBDebugToolkit DBDebugToolkit is a debugging library written in Objective-C. It is meant to provide as many easily accessible tools as possible while

Dariusz Bukowski 1.2k Dec 30, 2022
An in-app debugging and exploration tool for iOS

FLEX FLEX (Flipboard Explorer) is a set of in-app debugging and exploration tools for iOS development. When presented, FLEX shows a toolbar that lives

FLEXTool 13.3k Dec 31, 2022
Next generation debugging framework for iOS

Alpha is the idea of a next generation debugging framework for iOS applications. It combines multiple debugging tools built on top of a simple, unifie

Dal Rupnik 733 Oct 29, 2022
Dotzu In-App iOS Debugging Tool With Enhanced Logging, Networking Info, Crash reporting And More.

Dotzu In-App iOS Debugging Tool With Enhanced Logging, Networking Info, Crash reporting And More. The debugger tool for iOS developer. Display logs, n

Remi ROBERT 1.8k Jan 3, 2023
iOS network debugging, like a wizard 🧙‍♂️

Start debugging iOS network calls like a wizard, without extra code! Wormholy makes debugging quick and reliable. What you can do: No code to write an

Paolo Musolino 2.1k Jan 8, 2023
Free macOS app for iOS view debugging.

Introduction You can inspect and modify views in iOS app via Lookin, just like UI Inspector in Xcode, or another app called Reveal. Official Website:h

Li Kai 575 Dec 28, 2022
Droar is a modular, single-line installation debugging window

Droar is a modular, single-line installation debugging window. Overview The idea behind Droar is simple: during app deployment stages, adding quick ap

Myriad Mobile 55 Sep 24, 2022
Convenient debugging button.

FunnyButton Example 在平时开发,运行期间有时候想中途看一下某个视图或变量的信息,虽说打断点是可以查看,但有时候断点调试有时候会卡住好一会才能看到(尤其是大项目经常卡很久),极度影响效率。 基于这种情况,FunnyButton就是为了能够便捷调试的全局按钮,添加好点击事件,就能随时

健了个平_(:з」∠)_ 2 Sep 20, 2022
In-app console and debug tools for iOS developers

LocalConsole Welcome to LocalConsole! This Swift Package makes on-device debugging easy with a convenient PiP-style console that can display items in

Duraid Abdul 650 Jan 1, 2023
Customizable Console UI overlay with debug log on top of your iOS App

AEConsole Customizable Console UI overlay with debug log on top of your iOS App AEConsole is built on top of AELog, so you should probably see that fi

Marko Tadić 142 Dec 21, 2022
a iOS network debug library, monitor HTTP requests

NetworkEye README 中文 NetworkEye,a iOS network debug library,monitor HTTP requests. It can be detected HTTP request include web pages, NSURLConnection,

coderyi 1.4k Dec 31, 2022
Tool to debug layouts directly on iOS devices: inspect layers in 3D and debug each visible view attributes

Introduction Features Inspect layouts directly on iOS devices Inspection could be triggered only if app is running under DEBUG build configuration, so

Ihor Savynskyi 510 Dec 24, 2022
A little and powerful iOS framework for intercepting HTTP/HTTPS Traffic.

A little and powerful iOS framework for intercepting HTTP/HTTPS Traffic from your app. No more messing around with proxy, certificate config. Features

Proxyman 874 Jan 6, 2023
blued enhanced tweak for iOS

BLUEDHOOK 本项目支持 Blued、Blued 极速版。 非越狱机型请通过 Monkeydev 环境打包 ipa 或 dylib/deb 进行重签名,越狱机型直接安装 release deb 即可。 已知问题 重签后不支持 apns 推送 同时安装 Blued、Blued 极速版 并登录同一

null 22 Oct 22, 2022
TouchInspector - a lightweight package that helps you visualize and debug touches on iOS and iPadOS

TouchInspector is a lightweight package that helps you visualize and debug touches on iOS and iPadOS.

Janum Trivedi 116 Jan 3, 2023