Table of Contents
Develop VS Code extension
Introduce how to develop an extension for VS Code.
Overview
This page only records some of the key steps and commands. If you want to learn more details, please refer to your-first-extension to get started.
Preparation
Below are the installation steps in Linux.
sudo apt install nodejs
sudo apt install git
sudo apt install npm
sudo npm install -g yo generator-code
Development And Test
- Run yo code.
This command scaffolds a TypeScript or JavaScript project ready for development. - Develop your extension.
- Press F5 in the VS Code editor. This will compile and run the extension in a new window.
- Run the command you designed from the Command Palette (CtrlShiftp) in the new window.
I have found a way to develop extensions using Python. However, it was
archived because the author did not have time to maintain it.
Please refer to vscode-ext.
Generate Extension
- Run vsce package in the root directory to package an extension.
- Run vsce publish in the root directory to publish an extension.
Extension Management
- Run code –install-extension /path/to/ext.vsix to install an extension.
- Run code –list-extensions to list the ext-id of the installed extensions.
- Run code –uninstall-extension ext-id to uninstall an extension.
Useful Links
- VS Code API
This page lists all VS Code APIs that you can invoke in your Visual Studio Code extension.