Skip to content

Debugging swift testing tests fails to attach #1146

Open
@adam-fowler

Description

@adam-fowler

Describe the bug
If I try to debug a swift testing test the debugger fails to attach to the process.

A dialog opens with the following text

process exited with status -1 (attach failed (Not allowed to attach to process. Look in the console messages (Console.app), near the debugserver entries, when the attach failed. The subsystem that denied the attach permission will likely have logged an informative message about why it was denied.))

To Reproduce
Steps to reproduce the behavior:

  1. Open project with swift-testing tests
  2. Run debug tests

Expected behavior
You should be able to test swift-testing tests

Environment

  • OS: macOS 15.0
  • Swift version: Apple Swift version 6.0 (swiftlang-6.0.0.9.10 clang-1600.0.26.2)
  • Visual Studio Code version: 1.94.2
  • vscode-swift version: 1.11.3

This is the debug console output

Console is in 'commands' mode, prefix expressions with '?'.
Launching: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/libexec/swift/pm/swiftpm-testing-helper --test-bundle-path /Users/adamfowler/Developer/server/soto-project/soto-cognito-authentication-kit/.build/arm64-apple-macosx/debug/soto-cognito-authentication-kitPackageTests.xctest/Contents/MacOS/soto-cognito-authentication-kitPackageTests --testing-library swift-testing --enable-swift-testing --event-stream-version 0 --event-stream-output-path /var/folders/6v/zhyq15kx1fz1d9hjv1zq9n8c0000gn/T/vscodemkfifo-1729201780878 --filter SotoCognitoAuthenticationKitTests.* -Xswiftc -diagnostic-style=llvm

Minimal diagnostic bundle

Metadata

Metadata

Labels

bugSomething isn't workingswift-testingIssues related to testing integration with swift-testing

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions