microsoft / microsoft/vscode-cpptools

MIMode lldb unkown options

Open
#11,441 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

debugger help wanted
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

Environment
  • OS and version: Arch Linux x86_64 and Kernel 6.4.12-arch1-1
  • VS Code: 1.82.0 8b617bd08fd9e3fc94d14adb8d358b56e3f72314 x64
  • C/C++ extension: v1.17.5
  • OS and version of remote machine (if applicable):
  • GDB / LLDB version: lldb version 16.0.6
Bug Summary and Steps to Reproduce

Bug Summary:
Can't use lldb with cppdgb.

Steps to reproduce:
try to debug any c program with the configuration provided.

Debugger Configurations
{
            "name": "cppdbg",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/build/main",
            "cwd": "${workspaceFolder}",
            "MIMode": "lldb",
            "miDebuggerPath": "lldb",
}
Debugger Logs
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (198) LaunchOptions{\"name\":\"cppdbg\",\"type\":\"cppdbg\",\"request\":\"launch\",\"program\":\"/home/dh/Programms/llvm/build/main\",\"cwd\":\"/home/dh/Programms/llvm\",\"MIMode\":\"lldb\",\"miDebuggerPath\":\"lldb\",\"preLaunchTask\":\"make\",\"logging\":{\"engineLogging\":true,\"trace\":true,\"traceResponse\":true},\"__configurationTarget\":6,\"configSource\":\"workspaceFolder\",\"debugType\":\"debug\",\"__sessionId\":\"78ac6fca-a9a9-4fee-886c-6ebed1ead182\"}\n"},"seq":2}
1: (198) LaunchOptions{"name":"cppdbg","type":"cppdbg","request":"launch","program":"/home/dh/Programms/llvm/build/main","cwd":"/home/dh/Programms/llvm","MIMode":"lldb","miDebuggerPath":"lldb","preLaunchTask":"make","logging":{"engineLogging":true,"trace":true,"traceResponse":true},"__configurationTarget":6,"configSource":"workspaceFolder","debugType":"debug","__sessionId":"78ac6fca-a9a9-4fee-886c-6ebed1ead182"}
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (241) DbgCmd:echo $$ > /tmp/Microsoft-MIEngine-Pid-ytth1ufk.buj ; cd \"/home/dh/Programms/llvm/build\" ; DbgTerm=`tty` ; set -o monitor ; trap 'rm \"/tmp/Microsoft-MIEngine-In-j45tl1g2.p5r\" \"/tmp/Microsoft-MIEngine-Out-ml23qzr3.qiy\" \"/tmp/Microsoft-MIEngine-Pid-ytth1ufk.buj\" \"/tmp/Microsoft-MIEngine-Cmd-hv42go4j.w5c\"' EXIT ; \"/usr/bin/lldb\" --interpreter=mi --tty=$DbgTerm < \"/tmp/Microsoft-MIEngine-In-j45tl1g2.p5r\" > \"/tmp/Microsoft-MIEngine-Out-ml23qzr3.qiy\" & clear; pid=$! ; echo $pid > \"/tmp/Microsoft-MIEngine-Pid-ytth1ufk.buj\" ; wait $pid; \n"},"seq":4}
1: (241) DbgCmd:echo $$ > /tmp/Microsoft-MIEngine-Pid-ytth1ufk.buj ; cd "/home/dh/Programms/llvm/build" ; DbgTerm=`tty` ; set -o monitor ; trap 'rm "/tmp/Microsoft-MIEngine-In-j45tl1g2.p5r" "/tmp/Microsoft-MIEngine-Out-ml23qzr3.qiy" "/tmp/Microsoft-MIEngine-Pid-ytth1ufk.buj" "/tmp/Microsoft-MIEngine-Cmd-hv42go4j.w5c"' EXIT ; "/usr/bin/lldb" --interpreter=mi --tty=$DbgTerm < "/tmp/Microsoft-MIEngine-In-j45tl1g2.p5r" > "/tmp/Microsoft-MIEngine-Out-ml23qzr3.qiy" & clear; pid=$! ; echo $pid > "/tmp/Microsoft-MIEngine-Pid-ytth1ufk.buj" ; wait $pid; 
--> C (runInTerminal-6): {"type":"request","command":"runInTerminal","arguments":{"kind":"integrated","title":"cppdbg: main","cwd":"","args":["/bin/sh","/tmp/Microsoft-MIEngine-Cmd-hv42go4j.w5c"],"env":{}},"seq":6}
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (253) Wait for connection completion.\n"},"seq":8}
1: (253) Wait for connection completion.
Other Extensions

No response

Additional Information

cppdbg terminal output

error: unknown option: --interpreter=mi
error: unknown option: --tty=/dev/pts/3
Use 'lldb --help' for a complete list of options.

image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the cppdbg launch configuration using MIMode and miDebuggerPath, then reproduce the LLDB invocation shown in the debugger logs. Trace why the launch passes --interpreter=mi and --tty to lldb, and verify that debugging a C program starts without the reported unknown-option errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, typescript
Domain
devtools, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.