# Xcode 13.3 has broken debugging testing in the VSCode swift extension

**URL:** <https://forums.swift.org/t/xcode-13-3-has-broken-debugging-testing-in-the-vscode-swift-extension/55960>\
**Category:** LLDB\
**Created:** [March 15, 2022, 5:35pm UTC](https://forums.swift.org/t/xcode-13-3-has-broken-debugging-testing-in-the-vscode-swift-extension/55960 "2022-03-15T17:35:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![adam-fowler](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/adam-fowler/32/9266_2.png) [@adam-fowler](https://forums.swift.org/u/adam-fowler)\
**Post date:** [March 15, 2022, 5:35pm UTC](https://forums.swift.org/t/xcode-13-3-has-broken-debugging-testing-in-the-vscode-swift-extension/55960/1 "2022-03-15T17:35:30Z")

</div>

With the release of Xcode 13.3 debugging tests in the Visual Studio Code swift extension has broken. Unfortunately VSCode is still reliant on Xcode to provide a version of `xctest` on macOS. Debugging tests involves sending `xctest` to `lldb`. Prior to the release of 13.3 this worked fine. Now I get the error

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

```

I know on the command line I can get around this by adding `--arch` parameter setting the architecture. I don't have control over the starting of lldb that is done by another extension [CodeLLDB](https://github.com/vadimcn/vscode-lldb). Is there other way to specify the architecture eg via environment variable?

---

<div class="post-metadata">

**Author:** ![Adrian\_Prantl](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/adrian_prantl/32/1582_2.png) [@Adrian\_Prantl](https://forums.swift.org/u/Adrian_Prantl)\
**Post date:** [March 15, 2022, 5:38pm UTC](https://forums.swift.org/t/xcode-13-3-has-broken-debugging-testing-in-the-vscode-swift-extension/55960/2 "2022-03-15T17:38:03Z")

</div>

Can you explain the workflow that you are using in more detail? How is VSCode invoking LLDB?

---

<div class="post-metadata">

**Author:** ![adam-fowler](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/adam-fowler/32/9266_2.png) [@adam-fowler](https://forums.swift.org/u/adam-fowler)\
**Post date:** [March 15, 2022, 5:46pm UTC](https://forums.swift.org/t/xcode-13-3-has-broken-debugging-testing-in-the-vscode-swift-extension/55960/3 "2022-03-15T17:46:03Z")

</div>

Hi Adrian,

As I said I am using the CodeLLDB extension to invoke lldb. I don't have control over how it is invoked. I create a launch configuration like below

```swift
{
    "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}",
        }
    ]
}

```

CodeLLDB then uses this information to setup a debugging session.

I was wondering what has changed to cause this issue? Is it because `xctest` now contains both `x86_64` and `arm64e` executables?

---

<div class="post-metadata">

**Author:** ![adam-fowler](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/adam-fowler/32/9266_2.png) [@adam-fowler](https://forums.swift.org/u/adam-fowler)\
**Post date:** [March 16, 2022, 7:32am UTC](https://forums.swift.org/t/xcode-13-3-has-broken-debugging-testing-in-the-vscode-swift-extension/55960/4 "2022-03-16T07:32:37Z")

</div>

I've narrowed this down to a change in lldb between Swift 5.5 and 5.6. In Swift 5.5 if I supplied a universal binary that contained both arm64e and x86\_64 executables lldb would automatically choose the correct executables to run based on the system it is running on. In Swift 5.6 this is no longer the case and you are required to specify the architecture. What was the reason for this change?

---

<div class="post-metadata">

**Author:** ![lukasa](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/lukasa/32/1232_2.png) [@lukasa](https://forums.swift.org/u/lukasa)\
**Post date:** [March 16, 2022, 7:45am UTC](https://forums.swift.org/t/xcode-13-3-has-broken-debugging-testing-in-the-vscode-swift-extension/55960/5 "2022-03-16T07:45:39Z")

</div>

Can I recommend filing a [bugs.swift.org](http://bugs.swift.org) report as well? It's useful to track this kind of issue.

---

<div class="post-metadata">

**Author:** ![adam-fowler](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/adam-fowler/32/9266_2.png) [@adam-fowler](https://forums.swift.org/u/adam-fowler)\
**Post date:** [March 16, 2022, 9:31am UTC](https://forums.swift.org/t/xcode-13-3-has-broken-debugging-testing-in-the-vscode-swift-extension/55960/6 "2022-03-16T09:31:47Z")

</div>

> [@lukasa](#):
>
> Can I recommend filing a [bugs.swift.org](http://bugs.swift.org) report as well? It's useful to track this kind of issue.

> <https://github.com/apple/llvm-project/issues/4294>
>
> | | |
> |------------------|-----------------|…
> |Previous ID | SR-15997 |
> |Radar | rdar://problem/90360204 |
> |Original Reporter | @adam-fowler |
> |Type | Bug |
> |Status | Resolved |
> |Resolution | Done |
>         
> \<details\>
> \<summary\>Environment\</summary\>
> 
> 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
> 
> 
> \</details\>
> 
> \<details\>
> \<summary\>Additional Detail from JIRA\</summary\>
> 
> | | |
> |------------------|-----------------|
> |Votes | 0 |
> |Component/s | LLDB for Swift |
> |Labels | Bug |
> |Assignee | @JDevlieghere |
> |Priority | Medium |
> 
>    
> 
> md5: 94857db454f85bd54d599fa8b9194dde
> 
> \</details\>
> 
> 
> 
> 
> 
> \*\*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
> 
> \`\`\` java
> 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\](https://github.com/vadimcn/vscode-lldb). 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
> 
> \`\`\` java
> {
> "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}",
> }
> \]
> }
> \`\`\`
