microsoft / microsoft/vscode-cpptools
The absence of `lldb-mi` prevents debugging `clang`-compiled programs with `gdb`, meaning that even if the `clang` task is set as the default, the configuration still needs to be manually selected each time the program is run.
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
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
gdbinstead oflldbto 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.
Reference:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the behavior with the task.json and launch.json configurations shown, then inspect how the extension selects debugger configurations and handles the lldb-mi-19 warning. Done means a clang build configuration using MIMode gdb and miDebuggerPath /usr/bin/gdb is not ignored and does not require manual selection each run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, vscode
- Domain
- developer-experience, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100