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

I will post the picture of what exactly I am asking 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.

Open your .py script in vscode
Right click anywhere on the script > Run current File in interactive Window
In the toolbar of the interactive window click on the variable icon
You can now consult the values of variables created by your script

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

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

Related

How to replicate the following Spyder behavior in VSCode?

I'm new to coding Python in VSCode. Previously I used Spyder but decided to move to VSCode as the project management seems better in it (I could easily switch to other files/folders by clicking on the path, just like in PyCharm). But I really need this one workflow which I still have not managed to do it in VSCode.
write some codes like Selenium.
Click run (F5)
The selenium browser opens up.
I could use the Ipython terminal to access the code interactively (find the element in the browser etc) and send new command.
I would like to have this workflow in VSCode. Im also quite overwhelmed by the difference in these 2 IDEs, for example, in VSCode, you have integrated terminal, a debugging console and an output tab, while im used to have only one-for-all Ipython tab.
Ok, I figured out what I need. Basically I just need to right click on the python file that I want to run on the side bar. Then I have to select 'run current file in interactive window'. The only difference is on the Ipython console, I have to use shift+Enter to send my input instead of just clicking enter. But its not a big deal.

lisp debugging in vscode?

I'm trying to walk through the Parenscript library to see how it renders, i.e. what actually happens when you make a (ps... ) call.
Ideally, I'd use VSCode to set breakpoints and watches and step into all called functions. There doesn't seem to be any lisp debugging extension in the VSCode marketplace.
Right now, I'm loading sbcl in a terminal window in VSCode and have command-shift-A bound to Terminal: Run Selected Text In Active Terminal, so that anything I write in the editor can be executed in sbcl.
Is there a way to set up the VSCode environment so that I can have access to debugging tools like watches and step-into?

How can i disable Jupyter as VS Code's default Python executor?

Jupyter kernel is slow to load and I don't need code cells in VS Code (they're poorly formatted anyways, and just awkward). Is there any way to disable Jupyter kernel as the executor and just go back to using ipython in the attached VS Code terminal?
This is what you need:
"python.dataScience.sendSelectionToInteractiveWindow": false
You can make it directly on settings.json file or through settings tab: Python > Data Science: Send Selection To Interactive Window.
You can make it at user or at workspace level.

How do you get the code in the canopy editor from the ipython console?

Is it possible to get the code in the currently open editor window in the Ipython console? I am interested in running an Ipython magic function that would grab the code in the current window, and send it to a website for analysis, and then show the response in the console. Any ideas?
Not exactly what you are asking for, but maybe the simplest approximation would be to run the ipython magic %history command and copy the output to clipboard.

IPython Autocomplete in PyCharm Run Window

I am coding in PyCharm Community Edition and making use of the IPython embed function to debug my code. When I run the code, the code stops on the line I have embed and the IPython interactive shell appears at the bottom of PyCharm in the "Run" window. I can inspect my variables and run commands, but all the IPython autocomplete (i.e. tabs) and up and down keys (to retrieve previous commands) don't work anymore. Does anyone know how to get this working from within PyCharm?
Thank you.