GithubHelp home page GithubHelp logo

lldb-cheatlist's Introduction

LLDB most used commands cheatlist

• print description:

po self.var

• make changes just for debugging:

expression self.var = false

• declare a variable (only visible in LLDB):

e NSString *$globalConstant = @"What's up"

• Set one breakpoint that enables another: put that in the expression command in the debugger line of the breakpoint:

breakpoint set --one-shot true --name "-[UILabel setText:]"

• Symbolic breakpoints - to print arguments use:

po $arg1 - is receiver

po (SEL)$arg2 - is the selector

po $arg3 - is the first argument

• Move the instruction pointer by dragging it. Or using LLDB:

thread jump --by 2 - move to lines forward

thread jump 100 - move to line 23

thread return - instantly executes returns, rest of the method doesn't get executed

In the variable navigator, you can set 'Watch' which will auto-break when the variable is changed. Using LLDB:

watchpoint set variable _currentModel->_title

watchpoint list - list of watchpoints

watchpoint delete 1 - delete watchpoint at the position 1 in watpoints list

• Print recursive description of view (with all subviews)

po [self.view recursiveDescription]

• Make the screen redraw after editing frames, etc.

e (void)[CATransaction flush]

Commands from Chisel

https://github.com/facebook/chisel

• Open a UIImage, CGImageRef, UIView, CALayer, NSData (of an image), UIColor, CIColor, or CGColorRef in Preview.app on your Mac.

visualize self.searchBar

• Show or hide the given view or layer. You don't even have to continue the process to see the changes!

show/hide self.view

• Alias for (void)[CATransaction flush]

caflush

• And much more, check out Chisel repo

lldb-cheatlist's People

Contributors

rpanichkin avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.