microsoft / microsoft/vscode-cpptools
External terminal when debugging in WSL
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 6.2k
- Forks
- 1.7k
- Ø Merge
- 14 Std. 46 Min.
- Gemergte PRs (30 T.)
- 61
Beschreibung
Hello,
Firstly I would like to say thank you for this awesome text editor and the C/C++ extension :)
I tried debugging C/C++ program in Windows Subsystem for Linux. The debugging session works fine but the only problem is that VS Code won't open an external terminal so I could not get stdout and stdin from a terminal during the debugging session.
So I have two questions:
- How can I open an external terminal for WSL debugging?
- Even there is not external terminal, how to get output from
stdoutand input tostdinduring the debugging session?
Here is my launch.json, as you can see I set "externalConsole": true but an external terminal won't appear:
{
"name": "maze_solver",
"type": "cppdbg",
"request": "launch",
"program": "maze_solver",
"args": [],
"stopAtEntry": false,
"cwd": "./",
"environment": [],
"externalConsole": true,
"pipeTransport": {
"debuggerPath": "/usr/bin/gdb",
"pipeProgram": "C:\\Windows\\sysnative\\bash.exe",
"pipeArgs": ["-c"],
"pipeCwd": "${workspaceFolder}/simulation/maze_solver"
},
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"sourceFileMap": {
"/mnt/d": "d:\\"
},
"logging": { "engineLogging": true }
}
Thank you very much!
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit der launch.json-Konfiguration, insbesondere externalConsole und pipeTransport, und reproduziere die C/C++-Debugging-Sitzung unter WSL. Verfolge, wie die Erweiterung für dieses Setup externe Terminals sowie die Standardeingabe und -ausgabe behandelt. Erledigt ist die Aufgabe, wenn das WSL-Debugging ein nutzbares externes Terminal öffnet oder stdin und stdout über die dokumentierte Alternative eindeutig unterstützt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- bash, cpp, vscode
- Bereich
- devtools, operating-systems
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 30/100