Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Dubugging Tips and Tricks for iOS development

Dubugging Tips and Tricks for iOS development

Elvis Lin

July 31, 2020
Tweet

More Decks by Elvis Lin

Other Decks in Programming

Transcript

  1. Debugging Know the current state Update the state without re-compiling

    Modify device or environment without re-launching
  2. Add a Breakpoint •Click the line to add a breakpoint

    •Edit the breakpoint to add a condition if it’s necessary
  3. Add a Watchpoint •Pause while the watched variable is changed

    •Steps: •Right click on a variable 
 in Debug Area •Select “Watch <name>”
  4. LLDB Print Commands Command Alias For Steps To Evaluate po

    <expression> expression —-object-description —- <expression> 1. Expression: evaluate <expression> 2. Expression: debug description p <expression> expression —- <expression> 1. Expression: evaluate <expression> 2. Outputs LLDB-formatted description v <name> frame variable <name> 1. Reads value of <name> from memory 2. Outputs LLDB-formatted description
  5. Switch Between Dark And Light mode •Simulator: Features -> Toggle

    Appearance •Xcode: Environment Overrides -> Interface Style