Skip to main content

Run it

The breakpoint has to be on code the app actually runs. A SwiftUI View.body is not a reliable place to stop, and a line that never executes at launch will not be hit. Put the code you care about in a method and break on the method, then use --tap-id or --tap-label to reach it. A real run, job bj_jsMui92dcp91HZzY, attached, set the breakpoint and stopped there:
The tap landed and the breakpoint stopped inside ContentView.addOne. The report box writes is .box/out/<job>/debug.txt.

What it costs

$0.05 per minute of build and test time on iOS, every started minute. The run above was three minutes. A run that ends because the Mac could not be prepared costs nothing.

How else people do this

Debugging in Xcode needs a Mac. GitHub-hosted macOS runners cost 10 times the Linux per-minute rate and do not give you an LLDB session (https://docs.github.com/en/billing/reference/actions-runner-pricing). Apple, Mac, macOS, iPhone, Xcode, Swift and SwiftUI are trademarks of Apple Inc., registered in the U.S. and other countries and regions. box is an independent service and is not affiliated with, sponsored or endorsed by Apple Inc.