In VS Code, I'm writing python code. I was wondering if there is a key shortcut to run the file instead of pressing the run button in the right top corner of the screen constantly.
Asked
Active
Viewed 2,946 times
1
-
Does this answer your question? [How to execute Python code from within Visual Studio Code](https://stackoverflow.com/questions/29987840/how-to-execute-python-code-from-within-visual-studio-code) – zaibaq Apr 27 '22 at 08:54
-
what does the official VSC doc say about Python – rioV8 Apr 27 '22 at 09:37
3 Answers
3
You can press Ctrl + F5 to run the file.
If you want to debug the file, use F5 instead.

cycool29
- 78
- 7
1
For anyone googling, this was my approach that has worked rather well
CTRLK + CTRLS brings the Keyboard Shortcuts menu.
At the top, in the search bar, type run python file.
From there, you can add a keybind to the Run Python File tag.

Nolan Pestano
- 47
- 1
- 6