You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
When set "valueFormatting":"prettyPrinters", looking value of uninited vectors results in longlongtime circling #462
Hello, as title says, when it happend, I had to stop debuging and in the next time only looking those containers that had being inited. At least not let my debug breaking in halfway. And I use Microsoft C/C++ extension, their solution is only showing at most 1000 items in vectors in the debug panel for not only uninited items but also inited items.
GDB doesn't know if the data is initialized or not, it just shows them with info locals (this extension uses the mi variant of this command).
If you enable pretty-printers then GDB is asked to use the pretty-printers installed to show the value... and as long as those don't recognize and handle negative lengths, something like you've described will be the result - this extension cannot do anything about that.
How to solve this? The best way would be to check for pretty-printers that at least handle the negative length as "not initialized" and does not print the vector's elements then. If they don't exist then you can create them and load them with the gdb options in the launch config.
The only other alternative would be to disable pretty-printing.
So: what are you going to do - and what should we do with this issue (possibly documenting it in README)?
Got it, thanks for clarifying! I'll just disable pretty-printing for now. And yes, adding a note about this to the README sounds like a great idea. It will definitely save others some headache.
Activity
GitMensch commentedon Dec 23, 2025
GDB doesn't know if the data is initialized or not, it just shows them with
info locals(this extension uses the mi variant of this command).If you enable pretty-printers then GDB is asked to use the pretty-printers installed to show the value... and as long as those don't recognize and handle negative lengths, something like you've described will be the result - this extension cannot do anything about that.
How to solve this? The best way would be to check for pretty-printers that at least handle the negative length as "not initialized" and does not print the vector's elements then. If they don't exist then you can create them and load them with the gdb options in the launch config.
The only other alternative would be to disable pretty-printing.
So: what are you going to do - and what should we do with this issue (possibly documenting it in README)?
yjdyamv commentedon Dec 23, 2025
Got it, thanks for clarifying! I'll just disable pretty-printing for now. And yes, adding a note about this to the README sounds like a great idea. It will definitely save others some headache.