microsoft / microsoft/vscode-cpptools
Unable to view program output when running debugger from Windows -> WLS
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
I am building the program in WLS and Launching it from Windows natively. Everything works fine, I can step through the program except that I cannot view any stdout because there is no console opening upon the start of a debug session
here is my launch.json file:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "C++ Launch",
"type": "cppdbg",
"request": "launch",
"program": "/mnt/c/Shared/x/program",
"args": [""],
"stopAtEntry": true,
"cwd": "/mnt/c/Shared/x/program/",
"environment": [],
"externalConsole": false,
"windows": {
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
"pipeTransport": {
"pipeCwd": "",
"pipeProgram": "c:\windows\sysnative\bash.exe",
"pipeArgs": ["-c"],
"debuggerPath": "/usr/bin/gdb"
},
"sourceFileMap": {
"/mnt/c": "c:\"
}
}
]
}
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 damit, die in launch.json beschriebene Debug-Sitzung zu reproduzieren, und konzentriere dich dabei auf pipeTransport, externalConsole und die Windows-to-WSL paths. Prüfe, wie stdout erscheinen soll, wenn das C++-Programm über bash.exe und gdb gestartet wird. Als erledigt gilt die Aufgabe, wenn die Programmausgabe während der Debug-Sitzung sichtbar ist, ohne das schrittweise Ausführen zu beeinträchtigen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- cpp, vscode
- Bereich
- devtools, operating-systems
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100