Angelin Calu
Angelin Calu

Reputation: 1915

How to test vscode extension in older versions of vscode

I would like to update the minimum vscode version requirement for an extension I wrote for users which are not using the latest version of vscode.

Issue link: https://github.com/x10sv/pml/issues/2

Any ideas how I might check my extension in different environments and see what would be the minimum version that my extension would be compatible with?

I suppose uninstalling and reinstalling different versions it's not the way to go.

Upvotes: 4

Views: 312

Answers (2)

HaaLeo
HaaLeo

Reputation: 11692

You can easily execute your integration tests for different VS Code versions in a CI pipeline. To do so, just specify the CODE_VERSION environment variable.

Upvotes: 1

Gama11
Gama11

Reputation: 34138

You can have multiple VSCode installations side-by-side, just choose a different directory during the installer.

However, the best option is probably to use the portable version for this. You should probably disable auto-updates so you actually stay on the version you want to test against. On Windows, the portable version actually has this "feature" out of the box:

Note as well that the Windows ZIP archive does not support auto update.

I'm not sure if there's any easy way to find the download links for old versions of portable mode though. The download page has the Windows .zip version, but only for the latest version. And the release note pages seem to be missing links for the .zip version.

Upvotes: 2

Related Questions