Skip to content

Testing VS Code Extensions

Akos Kitta edited this page Jul 11, 2019 · 4 revisions

How to test:

screen shot 2019-01-18 at 09 05 54

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.