Help! Why can't my vscode debug cPP see the value of vector, map?

problem description

clipboard.png
as shown in the figure, no matter how my vscode, vector, map changes when debugging, it only shows size=0

the platform version of the problem and what methods you have tried

related codes

/ / Please paste the code text below (do not replace the code with pictures)

what result do you expect? What is the error message actually seen?

would like to ask what this is all about? How should it be adjusted?

Dec.26,2021

you should be using MinGW, the update of MinGW is slow, and the support for container Vector,Map in STL is not good enough. You can use TDM-GCC, a compiled body debugging tool, which supports better.


< H2 > Windows when VS code debug cannot view the contents of the CPP STL container < / H2 >

first of all, you are likely to use the x64 version of Windows.

I found an effective solution, but when installing MinGW on x64 version of Windows, although the official recommended version of MinGW is x86q64, after practice, it is found that if you choose to install x86x64, it is very likely that you will not be able to see the specific information of STL containers (vecotr, map, etc.) when Debug, and you will see the corresponding memory address ~

. Therefore, it is recommended to choose i686 (win32) . Then the next step of the installation step and the rest of the operation will follow the default.

pretty-printing-not-work-with-MinGW GDB-solution

win32 MinGW:

i686-posix-dwarf


MinGW D:\MinGW MinGWbin D:\MinGW\i686-8.1.0-release-posix-dwarf-rt_v6-rev0\mingw32\bin PATH

MinGW

and my corresponding configuration files are as follows:

, .vscode\ tasks.json

{
    "configurations": [
        {
            "name": "Win32",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "windowsSdkVersion": "10.0.19041.0",
            "compilerPath": "gPP", // Or complete absolute path "D:/MinGW/i686-8.1.0-release-posix-dwarf-rt_v6-rev0/mingw32/bin/gPP.exe"
            "cStandard": "c11",
            "cppStandard": "cPP17",
            "intelliSenseMode": "clang-x86"
        }
    ],
    "version": 4
}
< H2 > attach the environment configuration of my computer < / H2 >
VSCode Version: 1.53.2 (system setup)
OS Version: Windows 10 x64 (Windows_NT x64 10.0.19041)
MinGW version: i686-8.1.0-release-posix-dwarf-rt_v6-rev0
GDB version: 8.1.0 (Target: i686-w64-mingw32)

I hope it will be useful to you. If you have any questions, please leave a message.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3e1d3-2bc3e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3e1d3-2bc3e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?