Skip to content

miDebuggerPath value when gdb is in Windows PATH #3076

@tewarid

Description

@tewarid

Type: Debugger

  • OS and Version: Windows version 10.0.17763.253
  • VS Code Version: 1.30,2
  • C/C++ Extension Version: 0.21.0
  • Other extensions you installed (and if the issue persists after disabling them): NA

To Reproduce

Building and debugging any C program using MINGW64, when miDebuggerPath in launch.json is unspecified or set to "gdb", results in the error below. System PATH variable has gdb.exe. Setting miDebuggerPath to "gdb.exe" does not cause the error.

error

launch.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "(gdb) Launch",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/examples/introduction/hello",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": true,
            "MIMode": "gdb",
            "miDebuggerPath": "gdb",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ]
        }
    ]
}

Metadata

Metadata

Labels

debuggerfixedCheck the Milestone for the release in which the fix is or will be available.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions