Last updated: Apr 6, 2024
Reading time·2 min
To add a run button in Visual Studio Code:
Ctrl
+ Shift
+ X
on Windows or Linux.Command
+ Shift
+ X
on macOS.Make sure to install the correct Code Runner extension as shown in the code sample.
Once you install the extension, open a file and click the run button to run it.
You can view a list of the supported languages on the extension's page.
You can also run the file by pressing F1
, typing run code and selecting
the command.
You can also use a keyboard shortcut to run the file:
Ctrl
+ Alt
+ N
Cmd
+ Option
+ N
If you hide the run button by mistake, right-click on the three dots ...
icon
at the top right corner and select Run Code
.
You can also use the built-in debugger as a run button.
You can also use the keyboard shortcut to show the debug pane:
Ctrl
+ Shift
+ D
Cmd
+ Shift
+ D
You can read more about debugging your code in this section of the official docs.
I've you get the error Linter pylint is not installed error in VS Code, click on the link and follow the instructions.
I've also written an error on how to solve the issue where the Live Server extension doesn't work in VS Code.
You can learn more about the related topics by checking out the following tutorials: