Environment
- VS Code: 1.119.0
- Platform: Linux (WSL / Dev Container)
- Architecture: x64
- DebugMCP server running successfully
- C/C++ extension installed (
ms-vscode.cpptools)
- Debug adapter:
cppdbg
- Debugger:
gdb
Problem
DebugMCP fails to start an existing C/C++ debug configuration on WSL/Linux.
Manual debugging with F5 works correctly using the existing launch.json.
However, when DebugMCP attempts to start the debug session, it appears to ignore or override the configured "program" field and instead derives a Windows-style executable name from the source file.
It attempts to launch:
/workspaces/ubuntu-c3c/nanopb/build-tests/legacy_cmake_simple/simple.exe
which does not exist.
The real executable is:
/workspaces/ubuntu-c3c/nanopb/build-tests/legacy_cmake_simple/build/simple
Existing launch.json
{
"name": "Debug nanopb simple",
"type": "cppdbg",
"request": "launch",
"program": "/workspaces/ubuntu-c3c/nanopb/build-tests/legacy_cmake_simple/build/simple",
"cwd": "/workspaces/ubuntu-c3c/nanopb/build-tests/legacy_cmake_simple/build",
"MIMode": "gdb",
"miDebuggerPath": "/usr/bin/gdb"
}
Observed behavior
DebugMCP agent output references:
{
"fileFullPath": "/workspaces/ubuntu-c3c/nanopb/build-tests/legacy_cmake_simple/simple.c",
"workingDirectory": "/workspaces/ubuntu-c3c/nanopb/build-tests/legacy_cmake_simple",
"configurationName": "Debug nanopb simple"
}
and then attempts to launch:
instead of using the configured "program" value from launch.json.
Expected behavior
DebugMCP should:
- Use the existing VS Code debug configuration exactly as defined
- Respect the
"program" field from launch.json
- Avoid generating
.exe targets on Linux/WSL environments
- Avoid inferring executables from source filenames when a valid launch configuration already exists
Additional notes
- Starting the debug session manually with
F5 works perfectly
- Breakpoints work correctly
Environment
ms-vscode.cpptools)cppdbggdbProblem
DebugMCP fails to start an existing C/C++ debug configuration on WSL/Linux.
Manual debugging with
F5works correctly using the existinglaunch.json.However, when DebugMCP attempts to start the debug session, it appears to ignore or override the configured
"program"field and instead derives a Windows-style executable name from the source file.It attempts to launch:
which does not exist.
The real executable is:
Existing launch.json
{ "name": "Debug nanopb simple", "type": "cppdbg", "request": "launch", "program": "/workspaces/ubuntu-c3c/nanopb/build-tests/legacy_cmake_simple/build/simple", "cwd": "/workspaces/ubuntu-c3c/nanopb/build-tests/legacy_cmake_simple/build", "MIMode": "gdb", "miDebuggerPath": "/usr/bin/gdb" }Observed behavior
DebugMCP agent output references:
{ "fileFullPath": "/workspaces/ubuntu-c3c/nanopb/build-tests/legacy_cmake_simple/simple.c", "workingDirectory": "/workspaces/ubuntu-c3c/nanopb/build-tests/legacy_cmake_simple", "configurationName": "Debug nanopb simple" }and then attempts to launch:
instead of using the configured
"program"value fromlaunch.json.Expected behavior
DebugMCP should:
"program"field fromlaunch.json.exetargets on Linux/WSL environmentsAdditional notes
F5works perfectly