Setting Up a Local Coding Environment

Developing C entails using a code editor to write and edit source code. We recommend the use of Visual Studio Code (VSCode), the installation instructions of which are given below. Once source code is written, we compile the code to machine code using a compiler. We use clang and gcc in this subject (on macOS, users actually use clang posing as gcc) for this effect.

The most common operating systems that students use are macOS and Windows, so we provide instructions for these.


Windows users will need to set up a Unix-like environment to compile and edit from. Currently the simplest way of doing this is by using WSL (Windows Subsystem for Linux) which installs another operating system, Ubuntu into a virtual machine. Then, you can install the compiler (gcc) and your code editor (Visual Studio Code). If you run into issues doing this, please create a thread on Ed.

WSL Installation and Compilation Environment Setup for Windows


macOS is a Unix-derivative environment (technically running the non-POSIX complaint Darwin kernel), simplifying our installation process. Install xcode’s build tools and you’re done.

GCC Installation on MacOS


Ed is a web based platform we use to distribute class exercises and provide a pre-configured environment in which you can develop your code.

Use this link to access Ed for the first time. This will activate your access to Ed via university email for subsequent accesses.

Visual Studio Code

After setting up your compiler, check out the following instructions for how to set up and code effectively in VSCode.

Visual Studio Code Installation

A more advanced document follows, teaching you how to use VSCode’s visual debugger. If you run into trouble with this, please reach out on Ed.

Debugging in Visual Studio Code