Skip to content

[SR-15997] Swift 5.6 LLDB breaks Visual Studio Code swift extension #4294

@adam-fowler

Description

@adam-fowler
Previous ID SR-15997
Radar rdar://problem/90360204
Original Reporter @adam-fowler
Type Bug
Status Resolved
Resolution Done
Environment

swift-driver version: 1.45.2 Apple Swift version 5.6 (swiftlang-5.6.0.323.62 clang-1316.0.20.8)

Target: x86_64-apple-macosx12.0

Additional Detail from JIRA
Votes 0
Component/s LLDB for Swift
Labels Bug
Assignee @JDevlieghere
Priority Medium

md5: 94857db454f85bd54d599fa8b9194dde

Issue Description:

With the release of Swift 5.6 debugging tests in the Visual Studio Code swift extension has broken.

When invoking LLDB with a universal binary it returns the following error

error: more than one platform supports this executable (host, remote-macosx), specify an architecture to disambiguate

This can be resolved by adding a --arch command line parameter but I don't have control over the invocation of lldb as that is done by another extension CodeLLDB. This is a different behaviour to the Swift 5.5 lldb which automatically chose a platform based on the system lldb was running on.

To debug tests I need to launch a debug session of `xctest` which is a universal binary. Because of the above this is no longer possible.

If you want to test this inside Visual Studio Code the launch config I setup to run a debug session looks like this

{
    "configurations": [
        {
            "type": "lldb",
            "request": "launch",
            "name": "MyProject Tests",
            "program": "/Applications/Xcode.app/Contents/Developer/usr/bin/xctest",
            "args": [".build/debug/myProjectPackageTests.xctest"],
            "env": {},
            "cwd": "${workspaceFolder:myProject}",
        }
    ]
}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions