Visual Studio Code

What is an IDE?

Visual Studio Code is a free code editor created by Microsoft that provides a place for you to write, edit and organise your code. Unlike a basic text editor such as Notepad, VS Code understands programming languages and provides tools that make development much faster and less prone to error. One of the ways that it does this is by highlighting the syntax in your code and suggesting autocomplete options (such as completing an id or variable name), both of which allow for a smoother time code writing and debugging. This, combined with a built in terminal, Git integration and many, many extensions makes it a necessity when writing any code.

Installing VS Code

Download the VS Code installer from its website and click the download button.

Select your operating system and once it has downloaded, open it to start the installation wizard.

Here you will want to accept the agreement and choose the folder where it will be installed (I use the default folder it chose for me).

Select whether you wish to create a desktop shortcut and tick the add "Open with code" action to Window Explorer file context to allow you to open files directly with VS Code. You will also want to tick "Register Code as an editor for supported files".

Tick the "Add to PATH" (which requires a restart). This adds the VS Code command-line tools (specifically the code command) to your system's PATH environment variable so that after installation, you'll be able to open VS Code or files in VS Code from the Command Prompt, PowerShell, or Windows Terminal.

Check other options that you want and click "Install". Once it is finished VS Code will be able to be launched.

Creating your Workspace

VS Code organises work into projects rather than individual files, so you will always want to create or open a project folder and use this as your workspace. Working like this is easier all around and allows you to search project files and integrate Git into your project.

Creating a project folder is as easy as creating a folder in the directory of your choice and then opening it in VS Code through File > Open Folder or even right click the folder and click "Open with Code" if you selected that option in your VS Code installation.

Using VS Code

VS Code is an incredibly versatile tool and all the official documentation can be found here . There are also a plethora of handy tutorials inside the official documentation and all over YouTube ranging from "VS Code in 100 seconds" highlight reels to hour long in depth dives so I encourage you to search for how to use VS Code for your specific purpose; odds are there will be a tailor made approach that will fit you perfectly. For me, the key things that I needed to know were:

  • Creating Workspaces
  • Opening the terminal in VS Code
    • Click Terminal in the menu bar (the bar with File, Edit, Selection etc) at the top and select New Terminal
    • The shortcut for this on windows is Ctrl + ' or on OS Cmd + '
    • If you have multiple terminals open you can switch between them by clicking on each instance listed to the right of your terminal section
  • Setting up Python on VS Code
    • Make sure that you have Python installed to your machine, the process is covered here
    • Install the Python extension inside VS Code from the extensions section on the left hand side and search for Python
    • Check that it's installed correctly in your VS Code terminal by checking the version with python --version
    • Select the interpreter by changing your VS Code search bar into the Command Palette with Ctrl + Shift + P and search "Python: Select Interpreter" and select your installed version
    • You can now run files in your terminal such as 'example_file.py' using the command python example_file.py
  • Using Git and GitHub in VS Code
    • Make sure that you have Git downloaded to your computer
    • Sign into your GitHub account in the terminal with
    • git config --global user.name "Your Name"
    • git config --global user.email your.email@example.com
  • Downloading your GitHub repository
    • Open a new window of VS code using File > New Window
    • One of the options given in the middle of your new window will be "Clone Git Repository" below New File, Open File, and Open Folder
    • Go to your repository in GitHub and copy the HTTPS link in the 'Code' section of your repo
    • Go back to VS Code and click that "Clone Git Repository" link
    • Paste the HTTPS link into what was the search bar at the top of the VS Code and press enter