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
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.
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.
I have the same issue but also in C++ projects. I work on projects some of which are C++ based with Objective-C and Swift and some are Swift. I use Visual Studio Code with the C++ Tools, CMake Tools and C++ Test Mate extensions to build, run and debug the application and unit tests on various macOS and Linux flavors. My C++ project is CMake and Conan based.
% lldb --version lldb-1322.214.171.124 Apple Swift version 5.6 (swiftlang-126.96.36.1993.62 clang-13188.8.131.52)
I filed an issue against the C++ Tools extension first https://github.com/microsoft/vscode-cpptools/issues/9067
So it looks like this is not a Swift only issue. Should I file an issue against LLDB itself?