10Creating Your Own Extensions


  • Understanding how to create a Visual Studio Code extension
  • Learning how to define the contributions made by your extensions
  • Integrating extensions into the existing Visual Studio Code user experience

As the previous chapter should have reinforced, Visual Studio Code is quite extensible, and third‐party authors (not to mention Microsoft) are taking advantage of that extensibility to create a wide range of useful extensions. But, almost inevitably, you will find things that are missing in Visual Studio Code or features you'd like added to help you or your team, so it makes sense to spend a bit of time looking at the details of how extensions are constructed.

The goal of this chapter is to walk you through the process of setting up a simple extension: examining the structure of an extension project, working with the different points of extension that are offered within Visual Studio Code, and considering how debugging an extension works.


While it's certainly possible to write a Visual Studio Code extension from scratch, it's a lot easier to utilize Yeoman and a code generator that has been provided.

If you're unfamiliar with Yeoman, it is a scaffolding tool. Its purpose is to create the starting point for projects of various types. It's language agnostic, because it's not actually compiling anything. It just creates the directory structure, adds the appropriate files, and off you go. If you haven't installed ...

Get Visual Studio Code now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.