Skip to content

Variables Pane for Python Console #17183

@brettcannon

Description

@brettcannon

Discussed in #16645

Originally posted by cbailiss July 10, 2021
I am attempting to use the REPL approach to develop Python, as essentially described here:
https://code.visualstudio.com/docs/python/editing#_run-selectionline-in-terminal-repl
i.e. highlighting subsets of lines, SHIFT+ENTER to execute in the Python Console in the Terminal pane.
This is iterative, writing code, executing, repeat. Variable values accumulate as work progresses.
Seeing variable values change whilst editing the code is instant feedback and very productive.
At present, there is no way to easily see variable values in the UI when working this way in VS Code.

PyCharm offers a very nice simple, compact and fast variable explorer as part of its Python Console
image
This pane also understands core Python data types well.

In VS Code, I am aware of the functionality of using # %% however this clutters code with comments and the UI is too much like Jupyter - i.e. another vertical pane, another console pane instead of existing Python Console, another input window, plus it renders the output like Jupyter rather than just focussing on variable values. SHIFT+ENTER still executes to the Console window. All-in-all, a jarring and cluttered experience.
Really, I want a variables explorer that is simpler, cleaner, faster and that is more aligned to working with the Python Console than Jupyter use cases. Without that, I am finding it difficult and frustrating to work with VS Code.
As an aside, I come from a background of almost 20 years working with C# (where I expect a compile-run-debug experience) and 5 years working with R. Modern Python development feels like to should support clean, simple, efficient REPL. R-Studio enables REPL with variable inspection for R (inc. when editing *.R files) in a really clean efficient way that VS Code doesn't seem to for *.py files.

I am aware this request is similar to microsoft/vscode-jupyter#3469 - hopefully I have explained my use reasoning above to avoid a repeat of the frustration present in that issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-terminalcommunity askFeature request that the community expressed interest infeature-requestRequest for new features or functionalityneeds proposalNeed to make some design decisions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions