Open
Description
Environment
- OS and version: Windows 24H2
- VS Code: 1.96.2
- C/C++ extension: 1.22.11
- OS and version of remote machine (if applicable): Ubuntu 24.04 WSL
- GDB / LLDB version: 15.0.50.20240403-git
Bug Summary and Steps to Reproduce
Bug Summary:
Even when configured to use gdb
to debug programs compiled with clang
, the C/C++ extension still ignores the clang
debug configuration due to the absence of lldb-mi
. This results in the need to manually select the configuration each time the program is run, even if the clang
task is set as the default.
Related issue: #12006, but this is not a duplicate (I'm not using lldb
at all).
Steps to reproduce:
- I have already configured to use
gdb
instead oflldb
to debug programs compiled withclang
:
"MIMode": "gdb",
"miDebuggerPath": "/usr/bin/gdb"
- C/C++ extension still shows:
Unable to find the "lldb-mi-19" debugger. The debug configuration for clang-19 is ignored.
Unable to find the "lldb-mi-19" debugger. The debug configuration for clang++-19 is ignored.
and I have to manually select the configuration each time the program is run, even if the clang
task is set as the default:
"group": {
"kind": "build",
"isDefault": true
},
Debugger Configurations
task.json:
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: clang++-19 build active file",
"command": "/usr/bin/clang++-19",
"args": [
"-std=c++23",
"-fstandalone-debug",
"-fsanitize=undefined",
"-fsanitize=address",
"-fcolor-diagnostics",
"-fansi-escape-codes",
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Task generated by Debugger."
}
],
"version": "2.0.0"
}
launch.json
{
"configurations": [
{
"name": "C/C++: clang++-19 build and debug active file",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}/${fileBasenameNoExtension}",
"args": [],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Set Disassembly Flavor to Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
],
"preLaunchTask": "C/C++: clang++-19 build active file",
"miDebuggerPath": "/usr/bin/gdb"
}
],
"version": "2.0.0"
}
C/C++ Extension Logs
Unable to find the "lldb-mi-19" debugger. The debug configuration for clang-19 is ignored.
Unable to find the "lldb-mi-19" debugger. The debug configuration for clang++-19 is ignored.