Running `swift test` while attached to a debugger

Hello all! I have some test code that succeeds when run from within Xcode but aborts when I run swift test. I’d like to set some breakpoints with lldb to figure out what’s happening. Is there an invocation of swift test that will allow me to set breakpoints and run the tests with a debugger attached?

I don't think there is such a feature, but you can use the --waitfor option to process attach in lldb to attach once the test process is running.

2 Likes
Terms of Service

Privacy Policy

Cookie Policy