Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS Code - how to rollback extension/install specific extension version

Just got an update for the Golang extension and it appears to be broken, reporting an error on a package main that's literally just a list of my imports with no useful information (see screenshot below). It's refusing to lint or do anything useful which is annoying.

screenshot of error in VS Code

So I want to quickly jump back to the previous version, how can I do this in VS Code? I can't seem to find it in the docs at all.

NB: I'm using VS Code version 1.10.1 with only the golang package. The code is valid golang.

like image 285
Southclaws Avatar asked Mar 06 '17 12:03

Southclaws


People also ask

How do I install a previous version of an extension in VS Code?

As there as some issues of doing that via command line, just do it from VSCode by clicking on uninstall button in extension screen. Select the file you've just downloaded and restart editor after installation. From now on you can use older version of your favorite extension.

How do I undo file changes in Visual Studio Code?

Click the (...) button and then select Undo Last Commit to undo the previous commit. The changes are added to the Staged Changes section.

Where are VS Code extensions stored?

However, extensions are stored in %USERPROFILE%\. vscode\extensions on Windows.

How do you restructure code in VS Code?

The code formatting is available in Visual Studio Code (VSCode) through the following shortcuts or key combinations: On Windows Shift + Alt + F. On macOS Shift + Option + F. On Linux Ctrl + Shift + I.


1 Answers

From v1.30 release notes: install previous versions of extensions.

You can now go back to a previous version of an extension if there are issues with the current version. VS Code provides an Install Another Version action on an installed extension which shows a dropdown of available versions.

The option to install another version is in the context menu. Or the gear icon for each extension.

For me when I do this - without "Disable Auto Updating Extensions" (I assume that the Debugger for Chrome is such an extension) it does not auto-update on reload or close/open but shows a button for that extension to install the latest version instead.

So it appears you don't have to disable all auto-updating extensions just to revert one extension to an older version and keep it at that older version. [leave a comment if you find that isn't true, thanks]

revert extension 1

revert extension 2

like image 120
Mark Avatar answered Sep 22 '22 21:09

Mark