Having used the interactive python debugger ipdb for my Python projects, I missed having a REPL in the standard Objective-C IDE. Fortunately, XCode comes equipped with a REPL called LLDB.
After adding a breakpoint in your code, you can interact with your code using LLDB commands in the bottom right window as shown in the following screenshot:
Here are a couple basic LLDB commands that I’ve found useful:
You can also define new breakpoints dynamically, add watchlists to monitor variables, and more. See the full command reference.
For a good look at how to use Xcode’s debugging features, all powered by the LLDB debugging engine, see the WWDC 2013 session video for Tools #407 WWDC 2013: Debugging with Xcode.
To see the latest advanced techniques to help you efficiently track down bugs with LLDB, view the WWDC 2013 session video for Tools #413 WWDC 2013: Advanced Debugging with LLDB.
📬 Subscribe to my newsletter
Get notified of my latest articles by providing your email below.