setup lldb debugging with cpp extension in vscode linux

  c++, visual-studio-code, vscode-debugger

I mostly use gdb for debugging c++ single files in vscode but now want to try lldb but i am facing issues while setting it up for vscode.

I first create default launch.json form debug tab selecting cpp gdb/dd then clang++ for configuration.

When the debugging starts.. it shows following error:

When the debugging starts.. it shows following error:

then in launch.json I changed miDebuggerPath path form /usr/bin/lldb-mi to /usr/bin/lldb.

Then when I launch the debugger it does NOTHING just debug controls up top and following lines in terminal:

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

anything I am missing here?

My whole launch.json is:

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "clang++ - Build and debug active file",
            "type": "cppdbg",
            "request": "launch",
            "program": "${fileDirname}/${fileBasenameNoExtension}",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "lldb",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ],
            "preLaunchTask": "C/C++: clang++ build active file",
            "miDebuggerPath": "/usr/bin/lldb"
        }
    ]
}

Source: Windows Questions C++

One Reply to “setup lldb debugging with cpp extension in vscode linux”

LEAVE A COMMENT