Inspiration

After both my teammate and I experienced teaching students as TAs for CS121/122, students struggled to run code in VSCode because there is no streamlined support for C in VSCode.

What it does

Easy C is a VSCode extension that invokes the local C compiler for all C files in your project. The user does not have to compile and execute C code manually. It also shows errors in the user's code in the problems tab.

How we built it

We created a VSCode extension using the extension generator tool provided by Microsoft. We then used NodeJS child process to find and compile C files in the project directory. Then, we use child process again to run the code in the VSCode terminal.

Challenges we ran into

We initially wanted a cross platform, lightweight compiler so that all students could execute code in a normalized way, but did not find any existing, current tooling that permitted that. Additionally, parsing errors emitted from the Clang compiler was a challenge because it does not support structured output. We navigated this challenge by disabling some default error info, which made it more clear to parse the stderr from Clang.

Accomplishments that we're proud of

Students can run any C files with no configuration.

What we learned

We learned how to make a VSCode extension with UI and interactivity.

What's next for Easy C

  • Debugger support
  • C++ support
  • Windows/Linux support

Built With

Share this project:

Updates