Skip to content

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

Description

@drgoochifer

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

Activity

  1. github-actions commented on May 23, 2025

    @github-actions

    Thank you for reporting this issue. We’ll let you know if we need more information to investigate it. Additionally, if you're working with GDB/LLDB, please note that the code is open source at https://github.com/microsoft/MIEngine/wiki/Contributing-Code . Your contributions are always welcome and appreciated.

  2. Subham-KRLX commented on Jul 1, 2025

    @Subham-KRLX
    Contributor

    Hey, I’d like to take a shot at fixing this!

    I’ve already got some open PRs in this repo (#13733, #13704), so I’m pretty familiar with the codebase. If there’s anything specific you'd like me to keep in mind while working on this bug, just let me know. Thanks!

  3. sean-mcmanus commented on Jul 1, 2025

    @sean-mcmanus
    Contributor

    Subham (@Subham-KRLX) This might be a bug with the MIEngine repo.

  4. Subham-KRLX commented on Jul 2, 2025

    @Subham-KRLX
    Contributor

    Hi Sean McManus (@sean-mcmanus), thanks for the pointer!

    I’m not familiar with the MIEngine codebase yet, but I’d like to help investigate and potentially fix this issue.
    Would you be able to give me a quick hint about where in MIEngine the debugger command arguments are constructed or passed to WSL?
    Any extra guidance or file/function pointers would really help me get started faster.

  5. sean-mcmanus commented on Jul 2, 2025

    @sean-mcmanus
    Contributor

    Subham (@Subham-KRLX) I have not done any work on MIEngine or the debugger in general (I work on the language service component). We do not currently have a developer working on the cpptools debugger specifically but you can see the commit history at https://github.com/microsoft/MIEngine/commits/main/ for the developers that are working on MIEngine. Our debugger source is generally located at https://github.com/microsoft/vscode-cpptools/tree/main/Extension/src/Debugger . The MIEngine component is bundled in as part of our build process. I do not know if the source of the bug is with our code in this repo or MIEngine (or somewhere else).

  6. Subham-KRLX commented on Jul 3, 2025

    @Subham-KRLX
    Contributor

    Thank you for the guidance and for pointing me to the right code locations. I took a look but realized I don’t have the bandwidth to fully tackle this right now. I had prefer to pass this along happy to follow along and help review if someone else picks it up. Thanks for your understanding!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugdebuggerhelp wantedCan be fixed in the public (open source) repo.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions