I checked a few recent Swift 5.2 development snapshots from swift.org/downloads (specifically January 13, January 11, and January 6 2020). In every snapshot, I receive the same error when I try to launch LLDB:
dyld: Library not loaded: @rpath/LLDB.framework/Versions/A/LLDB
Referenced from: /{redacted}/Toolchains/swift-5.2-DEVELOPMENT-SNAPSHOT-2020-01-13-a.xctoolchain/usr/bin/lldb
Reason: image not found
Abort trap: 6
To launch LLDB, I've been setting a "TOOLCHAINS" environment variable with the CFBundleIdentifier of the relevant toolchain (from its Info.plist file) and then running xcrun lldb
. This works fine in the latest version of the development snapshot from master, but fails with the above error for the Swift 5.2 toolchains. I also noticed that when I try to use the Swift 5.2 toolchain in Xcode, when I use the debugger Xcode launching the packaged version of LLDB instead of the one from the selected toolchain which makes me think LLDB isn't working for Xcode either.
Do I need to launch LLDB differently in the Swift 5.2 toolchain, or is LLDB in the toolchain broken?