microsoft / microsoft/vscode-cpptools

"wsl" "/usr/bin/gdb-multiarch --interpreter=mi" No such file or directory

Open
#13,626 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug 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: Microsoft Windows 11 10.0.22631 Build 22631
  • VS Code: 1.100.2
  • C/C++ extension: 1.25.3
  • OS and version of remote machine (if applicable): WSL - Ubuntu 24.04.1 LTS
  • GDB / LLDB version: GNU gdb (Ubuntu 15.0.50.20240403-0ubuntu1) 15.0.50.20240403-git
Bug Summary and Steps to Reproduce

Bug Summary:
From the Debug Console:

Starting: "wsl" "/usr/bin/gdb-multiarch --interpreter=mi"
/bin/bash: line 1: /usr/bin/gdb-multiarch --interpreter=mi: No such file or directory
"wsl" exited with code 127 (0x7F).

This appears to be due to that fact that VSCode passes "/usr/bin/gdb-multiarch --interpreter=mi" as a single argument and "/usr/bin/gdb-multiarch --interpreter=mi" is not a file.

Steps to reproduce:

  1. Create launch.json
  2. Start debugger
  3. Check Debug Console for error
Debugger Configurations
{
    // 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": "(gdb) Launch test",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceRoot}/build/out/test",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "miDebuggerServerAddress": "localhost:1234",
            "miDebuggerPath": "/usr/bin/gdb-multiarch",
            "pipeTransport": {
                "pipeProgram": "wsl",
                "pipeArgs": [],
                "debuggerPath": "/usr/bin/gdb-multiarch"
            },
            "sourceFileMap":{
                "/mnt/c": "C:\\"
            }
        }
    ]
}
Debugger Logs
Starting: "wsl"  "/usr/bin/gdb-multiarch --interpreter=mi"
/bin/bash: line 1: /usr/bin/gdb-multiarch --interpreter=mi: No such file or directory
"wsl" exited with code 127 (0x7F).
Other Extensions

No response

Additional Information

No response

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 pipeTransport configuration and the debugger launch log showing the wsl command and its quoted arguments. Reproduce the failure with the provided launch.json, then trace how the debugger command is assembled and passed to WSL. Done means WSL launches /usr/bin/gdb-multiarch with --interpreter=mi as a separate argument.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, typescript, vscode
Domain
devtools, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.