microsoft / microsoft/vscode-cpptools
Program sometimes freezes when quickly using the "Step over (F10)" button while debugging
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the freeze with the supplied C++ program, breakpoint, and repeated or held F10 presses on the listed environments. Compare the debugger logging and engine logging behavior during a freeze, then trace the relevant C/C++ extension debugging path; done means repeated stepping no longer leaves the program frozen and the existing debugging flow still works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, typescript
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100