code-debug
code-debug copied to clipboard
【bug】VARIABLES display wrong
GNU gdb (Ubuntu 8.1-0ubuntu3.2) 8.1.0.20180409

tthe gdb print the value of STL
value="std::unordered_map with 1 element = {[0] = {itemp = 1, str = "sss"}}"} {name="Una",value="std::unordered_map with 1 element = {[4] = 5, [3] = 4, [1] = 2}"}, {name="Mapint",value="std::map with 1 element = {[2] = 3}"}, {name="SetInt",value="std::set with 2 elements = {[0] = 1, [1] = 2}"}
I think maybe the version of gdb is not match 。 Can someone tell me the suitable version of gdb ?
try adding "valuesFormatting": "prettyPrinters" to your launch config
Earlier when this was implemented the usually available GDB versions were a little buggy / had some unsupported features but nowadays with modern versions it seems to work more consistenly and should support special types like this.