Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

DebugMCP incorrectly infers .exe target on WSL instead of using existing launch.json program

Aperta
#70 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
cpp, typescript, vscode

Direzione di ricerca

Inizia esaminando come viene selezionata la configurazione launch.json esistente denominata "Debug nanopb simple" e come i relativi valori fileFullPath e workingDirectory vengono convertiti in una destinazione di debug. Riproduci il caso WSL con la configurazione cppdbg fornita, quindi verifica che venga utilizzato il percorso del programma configurato e che non venga generata alcuna destinazione simple.exe.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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:

  1. Use the existing VS Code debug configuration exactly as defined
  2. Respect the "program" field from launch.json
  3. Avoid generating .exe targets on Linux/WSL environments
  4. 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
Lingua principale
TypeScript
Stelle
511
Fork
60
Merge medio
2g 1h
PR unite (30g)
18

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/DebugMCP

Tutte le issue di microsoft/DebugMCP

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.