I am new to VS Code. When I do Ctrl+K+S and type in run python
, I noticed that there are three ways of running a Python file:
May I know what is the difference between these three options? When should I use each of these options?
What it does:
Executes your Python script in the VS Code Output panel (a separate area that displays program output)
Executes the Python script in the integrated terminal of VS Code. Supports user input and command-line arguments. Simulates how Python works if you run it from a system terminal (e.g., python myfile.py
).
Similar to "Run Python File in Terminal", but it opens a new, dedicated terminal each time you run the script. Keeps each execution isolated from others.