microsoft / microsoft/vscode-cpptools
Set externalConsole to true does not open terminal, and the debugger just hangs.
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
Type: Debugger
Describe the bug
-
OS and Version: Window 10 1093 + WSL Centos 7
-
VS Code Version: 1.49.0
-
C/C++ Extension Version: 1.1.3
-
Other extensions you installed (and if the issue persists after disabling them):
There's no special software.
-
A clear and concise description of what the bug is.
When I set
externalConsoleinlaunch.jsontotrue, pressing F5 will fail to start the debugger, the debugger just hangs.
IfexternalConsoleis set tofalse, the debug function works fine, but instructions inDEBUG CONSOLEe.g.btorp varare invalid. What a dilemma it is :(
To Reproduce
Please include a code sample and launch.json configuration.
{
// 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": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "xxx/build_20.13.1.1/programs/myprograms",
"args": [
"--server",
"-C",
"config.xml"
],
"stopAtEntry": false,
"cwd": "xxx/build_20.13.1.1/programs",
"environment": [],
"externalConsole": ture, // if set to false,it works fine
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}
I've seen similar problems in the VsCode community, and they think the problem is caused by extension. Any idea?https://github.com/microsoft/vscode/issues/111160#issuecomment-732000615
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, den Fehler mit der bereitgestellten launch.json, der C/C++-Erweiterung, VS Code 1.49.0 und WSL CentOS 7 zu reproduzieren, und korrigiere den angezeigten externalConsole-Wert, falls erforderlich. Vergleiche das Drücken von F5 mit aktiviertem und deaktiviertem externalConsole; abgeschlossen, wenn das externe Terminal geöffnet wird und der Debugger normal startet und Debugger-Befehle wie erwartet verwendet werden können.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- cpp, linux, 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
- 35/100