microsoft / microsoft/vscode-cpptools
[bug] `cppdbg` hangs up and quits out by itself
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 6.2k
- Fork
- 1.7k
- Merge medio
- 14h 46m
- PR unite (30g)
- 61
Descrizione
Bug type: Debugger
Describe the bug
- OS and Version: Windows 11 home 21H1 22000.556
- VS Code Version:
Version: 1.65.2 (system setup) Commit: c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1 Date: 2022-03-10T14:33:55.248Z Electron: 13.5.2 Chromium: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 OS: Windows_NT x64 10.0.22000 - C/C++ Extension Version: v1.9.7
- Other extensions you installed (and if the issue persists after disabling them):
Name: C/C++ Extension Pack ID: ms-vscode.cpptools-extension-pack About: Popular extensions for C++ development in Visual Studio Code. Version: 1.1.0 Distributor: Microsoft VS Marketplace link: https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools-extension-pack Simplified Chinese Extension Golang Rust-Analyzer - A clear and concise description of what the bug is.
Start debugging, command-line showes, with input blocked:
& 'c:\Users\<user>\.vscode\extensions\ms-vscode.cpptools-1.9.7\debugAdapters\bin\WindowsDebugLauncher.exe' '--stdin=Microsoft-MIEngine-In-30v2n0bd.4ez' '--stdout=Microsoft-MIEngine-Out-sulr42l3.5u3' '--stderr=Microsoft-MIEngine-Error-42mhsbwh.w3f' '--pid=Microsoft-MIEngine-Pid-htnzwcvq.dhz' '--dbgExe=C:\msys64\usr\bin\gdb.exe' '--interpreter=mi'
By this time, inputting in the terminal is impossible, and no break points from the source file could be hitten, even if you compiled a single file with -g option.
Wait for a little more time, the debugger will quit out by itself, though the program requires input from stdin.
Detailed information is in the video below:
To Reproduce
Please include a code sample and launch.json configuration.
// launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "C++ quick run",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/${fileBasenameNoExtension}.exe",
"args": [],
"MIMode": "gdb",
"miDebuggerPath": "C:\\msys64\\usr\\bin\\gdb.exe",
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
// "console": "integratedTerminal",
"preLaunchTask": "C/C++: g++.exe produce active file",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"logging": {
"engineLogging": true,
"trace": true,
"traceResponse": true
}
}
]
}
// task involved
{
"type": "cppbuild",
"label": "C/C++: g++.exe produce active file",
"command": "C:\\msys64\\usr\\bin\\g++.exe",
"args": [
"-g",
"--std=c++17",
"-fdiagnostics-color=always",
"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe",
"${file}"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": ["$gcc"],
"group": "build",
"detail": "produced by debugger" // cpptools
},
Steps to reproduce the behaviour:
- Go to the single file you want to run
- Click on debug "C++ quick run".
- Wait for it.
- See the error.
Additional context
If applicable, please include logging by adding "logging": { "engineLogging": true, "trace": true, "traceResponse": true } in your launch.json
Before raising this issue, I've found that there are issues about Windows10's Beta UTF-8 feature, but I've turned it on and off, and nothing had happened, the bug now still exists.
Here is the log file, it's very huge and some part of it is in Chinese.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia riproducendo il caso su Windows 11 con il launch.json e l'attività di build C/C++ forniti, quindi esamina il file di log collegato e l'invocazione di WindowsDebugLauncher.exe. Confronta il comportamento di stdin, la gestione dei breakpoint e l'uscita del debugger con i passaggi riportati; il lavoro è completato quando l'input rimane utilizzabile, i breakpoint possono essere raggiunti e il debugger non si chiude inaspettatamente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- cpp, vscode
- Ambito
- devtools
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100