0

If I run Python script in VS Code, I would like new window to open and script should run in it. The same way it works if you just open the file using Python from file explorer. As far as I know, VS Code provides only running the script in VS code terminal.

As an example, atom-python-run extension for Atom has the same behaviour. Is there any way to achieve this in VS Code?

1 Answer 1

1

Unfortunately, it is not possible to run Python REPL in another window in Visual Studio Code.

You can run the program in external window. To do this, open "Run and Debug" section from left panel and then click create a launch.json file:

run and debug panel

In opened file change console property value to externalTerminal:

"console": "externalTerminal"

Save the file. After that programs from folder which contain .vscode/launch.json file will run in external terminal.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.