Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 383
Lambert Avatar asked Jun 12 '20 14:06

Lambert


People also ask

How do you collapse sections in VS Code?

Ctrl + Shift + [ on Windows and Linux. ⌥ + ⌘ + [ on macOS.

How do I disable Debug console in VS Code?

VS Code maintains a debug session while the program is running, and pressing the Stop button terminates the program.

How do I unhide the status bar in Visual Studio Code?

Search for “status bar” and check/uncheck the checkbox in the “Workbench > Status Bar: Visible” section to show/hide the status bar, respectively.


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.

like image 171
Pavel Minaev Avatar answered Oct 14 '22 14:10

Pavel Minaev