Those are some snippets that I made to help me use the extention vscode-debug-visualizer
Make sure the variable name is map or change the snippet below to use the right name.
{
"kind": { "grid": true },
"text": "A map visualization",
"columnLabels": [
{
"label": "test"
}
],
"rows": [
{
"label": "keys",
"columns":
Array.from(map.keys()).map(key => ({ "content": `${key}`, "tag": `${key}` }))
},
{
"label": "values",
"columns":
Array.from(map.values()).map(value => ({ "content": `${value}`, "tag": `${value}` }))
}
]
}
Or as a table
{
kind: { table: true },
rows: [...map].map(([k, v]) => ({ key: k, value: v }))
}