Skip to content

Add a way to attach a debugger to runs of swift test #8129

@daniel-grumberg

Description

@daniel-grumberg

Description

Currently there is no existing workflow for attaching a debugger on the command line to an invocation of swift test. the workflow I use today is less than ideal, I run: lldb -w -n swiftpm-testing-helper for Swift Testing tests or lldb -w -n xctest for XCTest tests.

Expected behavior

It would be nice to have a couple of couple of extra options to swift test to attach a debugger, maybe:

# Run tests normally
swift test

# Run tests under lldb
swift test --debugger

# Run tests with a debugger and pause initially (e.g. to set some breakpoints before the tests run)
swift test --debugger --pause-on-launch

This would lead to feature parity with swift run --debugger.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions