Skip to content
vadimcn edited this page Sep 7, 2021 · 1 revision

The default LLDB backend bundled with CodeLLDB supports C, C++, Rust, as well as many other languages whose debug info is compatible with C++, however this list does not include Swift. It appears that Swift has diverged far enough from C++ that LLDB cannot interpret its debug info without a special Swift plugin.
It is, however, still possible to debug Swift programs using CodeLLDB by directing it to use an alternate debugger backend, namely, the one provided with the Swift toolchain:

  • Open VSCode commands palette and search for "LLDB: Use Alternate Backend..." command.
  • At the prompt, enter executable name of the LLDB instance you want to use. On MacOS, you should use the default system instance (i.e. just lldb). On Linux, look for lldb in <swift install root>/usr/bin directory.
  • If all goes well, CodeLLDB should report that it has located the library it needs and ask for your confirmation, after which it will add lldb.library configuration setting in the current workspace. If auto-detection does not work, you can also locate liblldb...so/dylib/dll manually.
Clone this wiki locally