DebugMCP incorrectly infers .exe target on WSL instead of using existing launch.json program
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- cpp, typescript, vscode
- Domain
- devtools, operating-systems
Research direction
Start by examining how the existing launch.json configuration named "Debug nanopb simple" is selected and how its fileFullPath and workingDirectory are converted into a debug target. Reproduce the WSL case with the provided cppdbg configuration, then verify that the configured program path is used and no simple.exe target is generated.
Written by the indexing model from the issue text.
Description
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:
simple.exe
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 fromlaunch.json - Avoid generating
.exetargets 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
F5works perfectly - Breakpoints work correctly
- Dominant language
- TypeScript
- Stars
- 511
- Forks
- 60
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 18
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/DebugMCP
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
All issues in microsoft/DebugMCP
Similar issues
-
blocklist removal
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
MetaMask/eth-phishing-detect#296544 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
pastelsky/bundlephobia#1122 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
category/development priority/P2 scope/file-operations scope/testing type/enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100