Install VS Code
A professional editor with colours, auto-complete and a Run button. Free forever.
Learn it
VS Code shows your files, your code and a terminal in one window.
Visual Studio Code (VS Code) is a free code editor from Microsoft. It colours your code, spots mistakes as you type, suggests names and has a built-in terminal. It is the most popular editor in the world.
Out of the box it edits text. The free Python extension (published by Microsoft) teaches it Python: colours, error underlines, a Run button and a debugger.
In VS Code you always open a folder (your project), not single files. That way the file list on the left, the terminal and the Python settings all belong to the project.
- Go to code.visualstudio.com and click Download for Windows. Or install from Terminal:
winget install -e --id Microsoft.VisualStudioCode
- Run the installer. On the Select Additional Tasks screen, tick Add to PATH and Add "Open with Code" action. Then click Install.
- Open VS Code. Click the Extensions icon on the left (four squares), search for Python, choose the one by Microsoft and click Install.
- Open your project: File, Open Folder, choose
code\vault_breaker. If asked "Do you trust the authors?", click Yes (it is your own folder). - Click
hello.pyin the file list. Press the Run triangle at the top right. The output appears in the terminal panel at the bottom.You should see something likeHello from my own computer!
- Go to code.visualstudio.com and click Download for Mac. Open the downloaded file and drag Visual Studio Code into your Applications folder.With Homebrew:
brew install --cask visual-studio-code - Open VS Code from Applications. Press Cmd + Shift + P, type shell command and choose Install 'code' command in PATH. Now you can type
code .in Terminal to open a folder. - Click the Extensions icon on the left, search for Python, choose the one by Microsoft and click Install.
- Open your project from the terminal:
cd ~/code/vault_breaker
code .
- Click
hello.py, then press the Run triangle at the top right. If asked, choose the Python you installed.You should see something likeHello from my own computer!
- Go to code.visualstudio.com and download the .deb file (for Ubuntu, Debian and Chromebooks). On a Chromebook, open your Downloads folder, double-click the file and choose Install with Linux.
- On Ubuntu or Debian, install the downloaded file from the terminal:
sudo apt install ./Downloads/code_*.deb
- Open VS Code, click the Extensions icon, search for Python, choose the one by Microsoft and click Install.
- Open your project:
cd ~/code/vault_breaker
code .
- Click
hello.py, then press the Run triangle at the top right.You should see something likeHello from my own computer!
Capture the flag
+10 XPWho publishes the official Python extension for VS Code?
Create a free account to start this lab
Sign in to answer the flag question. Your progress, XP and code are saved to your account. No card needed.
Editor ready
+20 XPSet up VS Code for the rest of the course.
Create a free account to start this lab
Sign in to do this homework and have it checked. Your progress, XP and code are saved to your account. No card needed.