I'm using Visual Studio Code, and I'd like to have a REPL that I can run single Python instructions in. I've found some year-old Microsoft documentation on this that says select the View > Other Windows > Interactive menu item, but there is no Other Windows item in my version of VS Code (1.44.2).
Does VS Code have a REPL feature, or do I have to run python.exe directly from the Terminal pane?
You are looking at the wrong documentation. That's for Visual Studio, not Visual Studio Code. They are annoyingly similarly named, which can be confusing, but they are two completely different IDEs.
The correct docs for VS Code is here:
https://code.visualstudio.com/docs/languages/python
There is a section for running Python codes on the Terminal:
https://code.visualstudio.com/docs/languages/python#_run-python-code
You can use the standard Python console.
There's also an option to run the entire file.
See the Run Python Code section of the docs for more info.
You can open the command palette and enter python: Start REPL
This will open the REPL.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With