Anil Dhage
Anil Dhage

Reputation: 330

Does VS code have variable explorer object like we have it in spyder?

I will post the picture of what exactly I am asking variable explorer in spyder

variable explorer in spyder

So do we have this feature in VS code?

I tried a lot to find it on google but was unhappy to not find it.

Upvotes: 31

Views: 40884

Answers (3)

Alireza Manashty
Alireza Manashty

Reputation: 101

You can now find all variables in a Jupyter Notebook in VS Code in the Output panel under Jupyter: Variables

Jupyter: Variables

Upvotes: 1

Alexis
Alexis

Reputation: 1593

  1. Open your .py script in vscode
  2. Right click anywhere on the script > Run current File in interactive Window

RightClick

  1. In the toolbar of the interactive window click on the variable icon

Interactive Window

  1. You can now consult the values of variables created by your script

Variable Explorer

Upvotes: 19

rioV8
rioV8

Reputation: 28633

spyder is probably running a REPL (Jupyter is doing that also). From that python process they show the local and global variables, just like a debugger would do on a breakpoint.

If you use Python Interactive you have similar functionality with the Variables Explorer and Data Viewer or use Jupyter notebooks

Upvotes: 4

Related Questions