microsoft / microsoft/vscode-cpptools
Program sometimes freezes when quickly using the "Step over (F10)" button while debugging
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 6.2k
- Fork
- 1.7k
- Merge medio
- 14h 46m
- PR unite (30g)
- 61
Descrizione
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
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 freeze con il programma C++ fornito, il breakpoint e pressioni ripetute o prolungate di F10 negli ambienti elencati. Confronta il comportamento dei log del debugger e del motore durante un freeze, quindi traccia il percorso di debugging pertinente dell’estensione C/C++; il lavoro è completato quando l’esecuzione ripetuta passo-passo non lascia più il programma bloccato e il flusso di debugging esistente continua a funzionare.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- cpp, typescript
- Ambito
- devtools
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 30/100