| title | Create extensions |
|---|---|
| titleSuffix | Azure Data Studio |
| description | Learn about creating and adding extensions to Azure Data Studio |
| ms.prod | sql |
| ms.technology | azure-data-studio |
| ms.topic | conceptual |
| author | markingmyname |
| ms.author | maghan |
| ms.reviewer | alayu; sstein |
| ms.custom | seodec18 |
| ms.date | 09/24/2018 |
Extensions in [!INCLUDEname-sos] provide an easy way to add more functionality to the base [!INCLUDEname-sos] installation.
Extensions are provided by the Azure Data Studio team (Microsoft), as well as the 3rd party community (you!).
If you're interested in extending Azure Data Studio, you can create your own extension and publish it to the extension gallery.
Writing an Extension
Prerequisites
To develop an extension you need Node.js installed and available in your $PATH. Node.js includes npm, the Node.js Package Manager, which will be used to install the extension generator.
To start your new extension, you can use the Azure Data Studio Extension generator. The Yeoman extension generator makes it very easy to create simple extension projects. To Launch the generator, type the following in a command prompt:
npm install -g yo generator-azuredatastudio
yo azuredatastudio
Extensibility References
To learn about Azure Data Studio Extensibility see Extensibility overview. You can also see examples of how to use the API in existing samples.
You can debug your new extension using Visual Studio Code extension Azure Data Studio Debug.
Steps
- Open your extension with Visual Studio Code
- Install Azure Data Studio Debug extension
- Press F5 or click the Debug icon and click Start.
- A new instance of Azure Data Studio starts in a special mode (Extension Development Host) and this new instance is now aware of your extension.
After writing your extension, you need to create a VSIX package to be able to install it in Azure Data Studio. You can use vsce to create the VSIX package.
npm install -g vsce
vsce package
To publish your new extension to Azure Data Studio:
- Add your extension to https://github.com/Microsoft/azuredatastudio/blob/release/extensions/extensionsGallery.json
- We currently don't have support to host third party extensions, so instead of downloading the extension, Azure Data Studio has the option to browse to a download page. To set a download page for your extension, set the value of asset "Microsoft.AzureDataStudio.DownloadPage".
- Create a PR against release/extensions branch.
- Send a review request to the team.
Your extension will be reviewed and added to the extension gallery.
Publishing Extension Updates The process to publish updates is similar to publishing the extension. Please make sure the version is updated in package.json