Vscode-cmake-tools: Is it possible to debug clang build?

Created on 26 Apr 2020  路  3Comments  路  Source: microsoft/vscode-cmake-tools

Hi, sorry if this is duplication, I tried to read similar issues but still can't get it.
I used gcc kit, build/debug worked perfectly. Now I'm using Clang 10 kit, build is OK but I can't debug it.
First attempt was without any changes to project, log:

[proc] Executing command: /usr/bin/lldb-mi-10 --version
[proc] Executing command: /usr/bin/gdb-10 --version  <--- gdb-10 o_0 ??
[proc] Executing command: /usr/bin/lldb-10 --version
[proc] Executing command: /usr/bin/lldb-10 --version

And then it hangs with output:

warning: ignoring unknown option: --interpreter=mi
warning: ignoring unknown option: --tty=/dev/pts/2

I guessed that lldb is not supported at atll and I tried to use "cmake.debugConfig": {"miDebuggerPath": "/usr/bin/gdb" and it didn't work.

  1. Is it ever possible to use lldb out of the box?
  2. Is it possible to build with clang and debug with gdb?
  • Operating System: Ubuntu 18.04
  • CMake Version: 3.16
  • VSCode Version: 1.44.2
  • CMake Tools Extension Version: 1.3.1
  • Compiler/Toolchain: Clang 10
debulaunch bug duplicate fixed (release pending)

All 3 comments

Duplicate of #1060

I am on version 1.4.1 and can still reproduce this with lldb 10.
I tried to set:

"cmake.debugConfig": {
    "MIMode": "lldb",
    "miDebuggerPath": "/usr/bin/lldb-10"
}

then come the error:

[debugger] Unable to automatically determine debugger corresponding to compiler: /bin/clang++-10
[main] Failed to generate debugger configuration
Was this page helpful?
1 / 5 - 1 ratings