Home lldb
Post
Cancel

lldb

Advanced Debugging with Xcode and LLDB

expression xxx

  • As a breakpoint Debugger Command action
  • To insert code when debugging

symbolic breakpoint

[UILabel setText:]
1
self.view.recursiveDescription()
expression -l objc -O -- [`self.view` recursiveDescription];
1
jumpAstronaut(animated: false)

we can modify this when debugging as below

expression jumpAstronaut(animated: false)
1
thread jump --by 1
  • Here we jump one line of code
  • As a breakpoint Debugger Command action
p object

-- denotes there’s no more options

debug objc_msg_send

po $arg1

selector

po (SEL)$arg2

The first parameter maybe.

po $arg3

set a tempory breakpoint

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

Here we add that as a Debugging Command of our breakpoint.

alias

command alias poc expression -l objc -O --
po unsafeBitCast(0x7fb3afc3f400, to: ScoreboardView.self)

flush CATransaction

express CATransaction.flush()

load external scripts

1
 vim ~/.lldbinit

e short for expression

we can copy and po constraints when view Debugging

shift + control + option

command + click to click through view in View debugging

override appearance item in debug bar

This post is licensed under CC BY 4.0 by the author.