Skip to content

Testing VS Code Extensions

Moritz Eysholdt edited this page Jul 31, 2019 · 4 revisions

How to test:

  • build Theia from sources

  • create plugins folder under Theia repo folder

  • Google for an extension (*.vsix file) and download it to the plugins folder:1

  • start Theia browser example

  • check that the extension is installed, View main menu -> Plugins

  • test functionality of the extension


Alternatively, if you want to try any of the existing vscode-extension-samples without packaging them into a .vsix with vsce. You can do the following:

  • Clone the samples:
git clone https://github.com/microsoft/vscode-extension-samples.git
  • Build one of the samples, for instance webview-sample:
cd vscode-extension-samples/webview-sample/ && npm i && npm run compile
  • Make sure the out folder exists with the extension.js content.
  • Start Theia and open a workspace on the sample. In this case, it is path/to/the/vscode-extension-samples/webview-sample/.
  • F1 > Hosted Plugin: Start Instance. Your instance will open in a new window on port 3030.
  • Try the extension.
    • For instance, with the webview-sample, F1 > Cat Coding: Start cat coding session > 🐈

If something does not work:

  • file an issue
    • please check first that there is no similar issue already
  • mention which extension
  • what does not work
    • always check your expectations with what VS Code does
  • check browser console and server logs for errors and warnings. If there are some, mention them in the issue as well

1Alternatively, you can use the command "Deploy plugin by id" from the command palette. When asked for a parameter, enter the following: vscode:extension/<exension id>. "<extension id>" stands for the "Unique Identifier" from the extension homepage in the VS Code Marketplace.