microsoft / microsoft/vscode-cpptools
GDB selected frame is not updated when changing frame
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: KUbuntu 22.04
- VS Code: 1.94.2
- C/C++ extension:v1.22.10
- GDB / LLDB version: 12.1
Bug Summary and Steps to Reproduce
Bug Summary: When selecting a new frame using the VSCode interface, it does not always update the frame scope from within GDB.
Steps to reproduce:
- Configuration
This simple C++ files is enough to reproduce the error :
// ccp_tools_bug.cpp
#include <iostream>
void bar() {
std::cout << "bar" << std::endl;
}
int main() {
bar();
return 0;
}
Put a breakpoint on the bar function
- Starts the debugger, when stopped on the bar function, you can check the current selected frame using this command :
-exec info frame
Then, use the vscode interface to select the top frame and rerun the command :
You can see the selected frame was updated with success.
Now select the bar frame again and recheck the selected frame :
Here you can see the selected frame is no longer updated.
This is a bug I encountered while developing a plugin for GDB. Unfortunately this bug breaks an important feature for VScode users , and requires to starts gdb manually from a terminal
Debugger Configurations
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/examples/cpp_tools_bug",
"args": [],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Set Disassembly Flavor to Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
]
},
Debugger Logs
Too much output, the log comes attached
Other Extensions
- autoDocstring
- Black Formatter
- Clang-Format
- clangd
- Cmajor-tools
- CMake
- Cmake tools
- cmake-format
- Docker
- CS 128 clang tidy
- graphical debugging
The issue persists after disabling all these extensions
Here is the log of the debug console : cpp_tools_bug.log
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
Reproduziere das Problem mit ccp_tools_bug.cpp und untersuche das angehängte cpp_tools_bug.log, während du die Ausgabe von GDBs info frame vergleichst, nachdem du in VS Code die top- und bar-Frames ausgewählt hast. Verfolge den TypeScript-Pfad zur Auswahl von Debugger-Frames und überprüfe, dass wiederholte Frame-Wechsel den von GDB ausgewählten Frame synchron halten.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript
- Bereich
- devtools
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100