I am debugging a C++ program in Visual Studio Code. When I hover my mouse over a variable, I expect to see it's value in the small popup that appears, but instead I get some strange looking information. See the image for details. How can I change this? All the video and text tutorials that I found online seem to have no such issue.
Asked
Active
Viewed 2,157 times
0

Stupid Man
- 885
- 2
- 14
- 31
-
1`std::string` is a complex little monkey and that pop-up looks to be showing you all of that complexity. There may be a "pretty printer" out there that will tell VSC to only show the part you're interested in, the character array, but my familiarity with VSC is low. I poked at it a while back and decided it wasn't my sort of tool yet. Good job on getting the debugger working. A lot of people who don't claim to be stupid don't even get that far. – user4581301 Jun 25 '20 at 19:11
1 Answers
0
So its something to do with pretty printing of gdb the debugger. With MinGW its not working for STL objects like vector, string, map etc. This issue is being faced by a lot of others, found a lot of questions from past 3 months itself. The only solution that worked for me was to uninstall the existing MinGW instlattion and instead install MinGW-W64 from [here]. MinGW and MinGW-W64 are different2

Stupid Man
- 885
- 2
- 14
- 31