I am receiving the "error: unknown option: --interpreter=mi" when trying to debug with lldb in VS Code on Mac for C++, Clang Compiler, and an OpenMP implementation. I am unable to debug because of it. Below is the launch.json then tasks.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Build with Clang and OpenMP",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/CS267/tom_2.1/build/openmp", // Path to compiled binary
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}/CS267/tom_2.1/",
"environment": [],
"externalConsole": false,
"MIMode": "lldb", // Use LLDB for debugging
"setupCommands": [
{ "text": "-enable-pretty-printing", "description": "Enable pretty printing", "ignoreFailures": true }
],
"preLaunchTask": "Build with Clang and OpenMP",
"miDebuggerPath": "/usr/bin/lldb" // Path to LLDB on macOS
}
]
}
{
"version": "2.0.0",
"tasks": [
{
"label": "Build with Clang and OpenMP",
"type": "shell",
"command": "cmake",
"args": [
"--build",
"${workspaceFolder}/CS267/tom_2.1/build"
],
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": ["$gcc"],
"detail": "Generated task by debugging configuration."
}
]
}
I have tried editing the tasks.json and launch.json numerous times to no avail. Chat has not helped.
I had the same problem. I was able to fix it with the following launch.json file:
{
"version": "0.2.0",
"configurations": [
{
"name": "LLDB: C++ debug the active target",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/bin/${fileBasenameNoExtension}",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "lldb",
"preLaunchTask": "C/C++: g++ build active file"
}
]
}
with removed miDebuggerPath, setupCommands.
See also this https://github.com/microsoft/vscode-cmake-tools/issues/3908
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With