How can I disable/hide the grouping of variables in vscode-python

Viewed 1631

Recently the ms-python extension (v2020.5.86806) for vscode implements grouping of variables in the debug console/variable explorer.

They appear as:

<object>
  > special variables
  > function variables

Is there a way to disable this behavior?

EDIT: Screenshot added: enter image description here

1 Answers

There's no single flag to revert to old behavior, but you can fine-tune it on a per-group basis in your launch.json:

"variablePresentation": {
    "all": "inline",
    "class": "group",
    "function": "hide",
    "protected": ...,
    "special": ...,
}

"all" applies to all groups, and sets the default that can be overridden as needed; other group names are self-explanatory. For values, "group" is the default behavior, "hide" removes those variables entirely, and "inline" places them without grouping.

Note that the VSCode JSON schema hasn't been updated to reflect this yet, so you'll get squiggles when editing. It'll still work, though.

Related