How to create your own Visual Studio Code extension

With the VS Code extension generator and JavaScript, it’s easy to roll your own extension. Here’s how to get started

How to create your own Visual Studio Code extension
sorayut / Getty Images

In the space of only a couple of years, Visual Studio Code went from a curiosity to a juggernaut in the editor and IDE space. Much of VS Code’s popularity is due to its extensibility: Just about every common programming language, file type, development tool, or cloud service has a VS Code extension available for it.

Sometimes, though, you need to roll your own extension. And while making a Visual Studio Code extension still requires some heavy lifting, the lifting isn’t as heavy as it used to be. In this article we’ll take a quick tour of the tooling now used to help create Visual Studio Code extensions, and show you how to get started with a simple extension that you can then build out on your own.

Install Node.js and Yeoman

Visual Studio Code extensions are written in JavaScript, as is much of Visual Studio Code. If you don’t know about the Node.js JavaScript runtime, or JavaScript itself, read up on them first. You can optionally use TypeScript to develop Visual Studio Code extensions, but we’ll use JavaScript here since it’s more widely known.

First, install the following if you haven’t already:

To continue reading this article register now