cdt-gdb-vscode icon indicating copy to clipboard operation
cdt-gdb-vscode copied to clipboard

STL contaners items not visible in VARIABLES view

Open handymandorel opened this issue 3 weeks ago • 0 comments

Environment

  • CDT GDB Debug Adapter Extension: version 2.4.1
  • VSCodium version: 1.105.17075
  • Launch configuration
  {
            "name": "run",
            "type": "gdb",
            "request": "launch",
            "program": "test",
            "arguments": "TSAN_OPTIONS=second_deadlock_stack=1",
            "cwd": "test_dir",
            "environment": {},
            "initCommands": [
                "-gdb-set disassembly-flavor intel",
                "-enable-pretty-printing",
            ],
            "openGdbConsole": true,
            "preLaunchTask": "Build",
  }

Steps

  • A minmal C++ code that uses STL containers (eg. std::vector)
  • Add a breakpoint after container initialization
  • launch the debug session (see the Environment section)
  • Observe the "VARIABLES" pane and look for "Local" variables

Outcome

  • The STL containers are listed but their details is minimal (some metadata but not details about items)
  • Printing the variables in the gdb console shows the same metadata plus items details, it looks like the variables view truncates the output of gdb print
  • See attached pictures
    • Variables view: Image
    • gdb console: Image
    • Code: Image

Expected

  • Variables view should also show container items

handymandorel avatar Nov 07 '25 06:11 handymandorel