New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SR-15997] Swift 5.6 LLDB breaks Visual Studio Code swift extension #4294
Comments
@swift-ci create |
I also tried to set the default-arch in lldb and that still produced an error settings set target.default-arch x86_64
file /Applications/Xcode.app/Contents/Developer/usr/bin/xctest |
How exactly is the CodeLLDB plugin launching LLDB? Is it using the API directly or invoking lldb on the command line? In either case it would be important to understand what the plugin is doing exactly to diagnose the problem. |
Is this always/only happening with the xctest binary? (That one is little special because it works for multiple architectures at the same time). |
CodeLLDB uses the API to launch debug sessions. It is a general issue with universal applications (multi-arch) as I tested it with my own universal application. In Swift 5.5 you could run these through lldb (via CLI or API) without being required to specify the architecture. I'm guessing it choose the correct architecture based on the system it was running on . With Swift 5.6 it requires you to specify the architecture. I'm not sure if this is a bug or feature though. I would expect the default-arch settings to be used though. |
Comment by Hristo Hristov (JIRA)
So it looks like this is not a Swift only issue. Should I file an issue against LLDB itself? |
I worked around the issue on the 5.6 branch by disabling the remote-macosx platform: #4144 For the stable/20211026 and 5.7 branch I modified the platform selection logic upstream (https://reviews.llvm.org/D122684) to give priority to the select and host platform: #4147 |
Comment by Hristo Hristov (JIRA) @JDevlieghere When is this fix going to be released eventually? |
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
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
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
The text was updated successfully, but these errors were encountered: