Advance Debugging example with Pythagorean Theorem
Here the pdf with the presentation
- aButton and bButton position
- aLabel value
- Remove hardcoded line
self.bValue = 1
- calculateHypotenuse() params
Save it in ~/.lldbinit
-
command alias -h "Same as 'expression'" -- expr expression
-
command alias -h "Same as 'expression'" -- e expression
-
command alias -h "Refresh screen device to see the visual changes" -- flush expression -l objc -O -- [CATransaction flush]
-
command alias -h "Refresh screen device to see the visual changes" -- fl expression -l objc -O -- [CATransaction flush]
-
command alias -h "Same as 'po' but for swift with objc syntax" -- poc expression -l objc -O --
-
poc [self.view recursiveDescription]
-
expression aButton.frame = CGRect(x: 10, y: 10, width: 100, height: 40)
-
expression button.backgroundColor = .red
-
expression -l objc -O -- [CATransaction flush]
-
expression aLabel?.text = String(format: "a = %.0f", aValue!)
-
thread jump --by 1