Problem Statement:
The debugger is not able to provide the content of an STL container (i.e. vector or string).
Overview:
Below is my launch.json
, where I have added -enable-pretty-printing
as per this thread but I'm unable to see the content of the STL Container.
{
"version": "0.2.0",
"configurations": [
{
"name": "g++.exe - Build and debug active file",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "C:\\MinGW\\bin\\gdb.exe",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true,
}
],
"preLaunchTask": "C/C++: g++.exe build active file"
}
]
}
I tried even adding expression in the watch window. But that also didn't work for me. Or maybe I am missing something. this thread