I'm trying to debug my code in Visual Studio Code, but I run into an issues when trying to inspect an std::variant
. The "VARIABLES or WATCH" window just shows me: variable_name: {...}
. There is a dropdown arrow, but if I press it nothing shows up.
I have also tried writing std::get<0>(variable_name)
in the DEBUG CONSOLE but that gives me No symbol "get<0>" in namespace "std".
What should I do to be able to see some values? Do I need some extension and if so which?
What I have found and tried:
I have found this thread saying it is fixed with new release of Visual Studio, but I think that just applies to VS Community and not VS Code.
I also tried to enable the pretty printing in the launch.json but that doesn't seem to help.
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]