swiftlang / vscode-swift

Visual Studio Code Extension for Swift
https://marketplace.visualstudio.com/items?itemName=sswg.swift-lang
Apache License 2.0
745 stars 52 forks source link

Use `lldb-dap` instead of `CodeLLDB` for debugging #749

Closed ahoppen closed 5 months ago

ahoppen commented 5 months ago

If the Swift toolchain includes lldb-dap (which recent Swift development snapshots for 6.0 and main do), I think we should use that to debug an executable instead of relying on CodeLLDB.

adam-fowler commented 5 months ago

lldb-dap is not in the Linux toolchain. Anyway you can already use it by selecting the option Swift > Debugger: Use debug adapter from toochain. Temporarily in a release version of the extension you also need to set the path to the debug adapter as well because the current release uses the old debug adapter name lldb-vscode.

JDevlieghere commented 5 months ago

@adam-fowler with https://github.com/llvm/llvm-project/pull/88482 (and the corresponding cherry-pick to the Swift branches), do you think we can make that the default (and have a fallback for the old name in older releases)?

adam-fowler commented 5 months ago

@JDevlieghere There is a change, not yet released that uses lldb-dap if the Swift version is 6 or above.

adam-fowler commented 5 months ago

@JDevlieghere v1.9 which has just been released uses lldb-dap for swift 6 builds.