superbadtunacan
superbadtunacan

Reputation: 1

"error: unknown option: --interpreter=mi" trying to debug with lldb on Mac

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.

Upvotes: 0

Views: 50

Answers (1)

Jim Ingham
Jim Ingham

Reputation: 27203

lldb-mi is not bundled with lldb, it's a separate package you can get here:

https://github.com/lldb-tools/lldb-mi

But lldb-mi hasn't seen much support in quite a while now. Most of the effort to support VSCode is done on the lldb-dap adaptor, which is part of the standard lldb release. You might try using that instead.

Upvotes: 0

Related Questions