microsoft / microsoft/vscode-cpptools
Program sometimes freezes when quickly using the "Step over (F10)" button while debugging
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
Environment
- OS and version: Ubuntu 22.04 LTS, also happens on Windows an other Linux distros
- VS Code: 1.91.1
- C/C++ extension: v1.21.3
- GDB / LLDB version: GNU gdb (Ubuntu 12.1-0ubuntu1~22.04.2) 12.1
- GGC/G++ version: g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Bug Summary and Steps to Reproduce
Bug Summary:
When debugging a C++ program in Visual Studio Code using the Run and Debug button, the program sometimes freezes when quickly using the "Step over (F10)" button. This happens more often on slower computers, and happens more often when clicking the button in quick succession, or when holding the F10 button.
Steps to reproduce:
- Create a C++ program made out of several lines of code, I used a main function with "int x = 0;" and then 128 lines of "x++;", but this happens with any program. Default compiler flags can be used.
- Set a breakpoint for the first line.
- Hold the F10 button.
- The program will sometimes freeze at soms point. On slower machines this will happen almost every time, on faster machines it it rare.
Schermopname van 24-07-24 19:38:12.webm
Debugger Configurations
Default configuration:
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: g++ build active file",
"command": "/usr/bin/g++",
"args": [
"-fdiagnostics-color=always",
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Task generated by Debugger."
}
],
"version": "2.0.0"
}
Launch.json (after testing with debugger logs)
{
// 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": [],
"logging": {
"trace": true,
"traceResponse": true,
"engineLogging": true
}
}
Debugger Logs
There is no output in the Debug Console when the program freezes after enabling the logging for the debugger adapter.
Other Extensions
Issue persists without any other extensions installed.
Additional Information
No response
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 Freeze mit dem bereitgestellten C++-Programm, dem Breakpoint und wiederholtem oder gedrückt gehaltenem F10 in den aufgeführten Umgebungen zu reproduzieren. Vergleiche das Verhalten der Debugger-Logs und der Engine-Logs während eines Freeze und verfolge dann den relevanten Debugging-Pfad der C/C++-Erweiterung; fertig ist die Arbeit, wenn wiederholtes Einzelschritt-Ausführen das Programm nicht mehr einfriert und der bestehende Debugging-Ablauf weiterhin funktioniert.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- cpp, typescript
- Bereich
- devtools
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 30/100