Member-only story

Use lldb to Dynamically Change Code in Xcode

More than po

Steven Curtis
7 min readAug 4, 2020
Photo by Felix on Unsplash

Isn’t Xcode rather great? You can use breakpoints to help you see the current state of your application at a given time.

Many programmers know and understand the po command — but here we are going to take a deeper dive (sic) into the debugger and what we are able to do — even changing variables on the fly! Read on…

Prerequisites:

You will be expected to be aware how to make a Single View Application in Swift

The repo

There is a rather basic application stored in the repo that can allow you to display the names of some people in a UITableView. There aren’t any tricks in there, it really is a simple-me-do implementation.BUT for the tests to work you must make sure that `Peeps.json` is visible to the test target (i.e. is a member of the test target).

Basic po

po = Print object description

In my rather simple project I’ve decided to set a breakpoint on the let cell = … line

Click for Gist

--

--

No responses yet