How to list all extensions with command in codespaces? - visual-studio-code

I installed the extension in the codespaces, and the extension is shown in the browser installed section. But when I use the command code --list-extensions, it didn't show the installed extension. I want to know why and how to show the extensions with commands. Thanks.

Related

Installing a local unpackaged VSCode extension

I'm trying to install a custom version of a VSCode extension without packaging it into a .vsix file. I've copied an existing extension in ~/.vscode-server/extensions/original-extension to ~/.vscode-server/extensions/my-custom-extension with my modifications, but VSCode doesn't seem to detect that it's there: it's not in the Extensions sidebar after reloading the window, etc.
I've also tried and failed to install the custom extension locally in case it was something specific to the remote setup (copying into ~/.vscode/extensions and running VSCode locally), so that doesn't seem to be the issue.
From these (possibly outdated) docs, it seems like side-loading by just copying into the extensions folder should work: https://vscode-docs.readthedocs.io/en/stable/extensions/install-extension/#sharing-privately-with-others-side-loading . Is there a way to get VSCode to detect my extensions folder? What am I missing?

extensions don't install automatically in vs code

vs code doesn't install any extension automatically, I have to install and import it manually, how to make it install the extensions automatically?
The extension page looks like that and here is the console in toggle developer tools:
You can install the extension automatically in VS code. For doing this you can do something like this
code --install-extension <extension-vsix-path>
code --install-extension <extension-id>
You can use following command to install extension. If you have the extension downloaded into local PC you can use the local path as well as extension id which will download it from gallery.

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.
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.
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. Or the Extension Page in vscode: Uninstall dropdown: Install another version....
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]
Update for vscode v1.75:
See pinning extensions (to a specific version):
Make sure you have extension autoupdates enabled and try pinning
extensions to a specific version using following UI. Make sure
extensions are not getting auto updated after pinning.
From CLI : Install a specific version using following format -
code-insiders --install-extension eamodio.gitlens#13.1.1
From Extensions UI - Use *Install Another Version... action in the
context menu of the installed extension.
Make sure the pinned version is synced across VS Code instances - Use
Settings Sync feature to test this. To have different instances of VS
Code on same machine, open VS Code from CLI using different
user-data-dir and extensions-dir. Eg: code-insiders --user-data-dir <path> --extensions-dir <path>
Export and Import the profile with the pinned extension and make sure
in the imported profile, extension is still pinned. Export and Import
profile actions are available in the global activity context menu
(gear).
Si it appears that regardless of the Disable Auto Updating Extensions setting, pinning/reverting to a previous version of an extension should result in that extension not updating.
[EDIT] now it is supported -> see accepted answer
Currently downgrading is not (yet) supported.
However, you can uninstall the extension and then manually download and install a specific version by hand: https://code.visualstudio.com/docs/extensions/install-extension
And also this excellent answer: How to install VSCode extensions offline?

How to install VS code extension manually?

I am not able to download any extension via VS Code on my office system due to the proxy. Is there a way that I can do it manually by downloading and placing the downloaded files at the right place?
Download the extension from VSCode marketplace, it'll be a .vsix file, then do like the image below.
You can also use the command-line to install extensions from VSIX files using the --install-extension parameter.
code --install-extension /path/to/vsix
eg: code --install-extension vscodevim.vim
Just in case u have a same UI as mine. Happy coding!
You can also just drop the extension files into the correct folder. On mac, for example, this is ~/.vscode/extensions/. I'm unsure whether it works for all extensions, but it works just fine for a simple language specification.
Two notes when downloading an extension from VScode marketplace:
Version compatibility
Extensions are updated repeatedly on the marketplace. If you download and transfer it to the target computer, it may not work. One can try to look into version history of the extension and download the older version. But it is not easy to correlate the extension version with VSCode version. You can check the version of the extension on the online computer and try to find a match in the marketplace. But sometimes the older versions are not listed there.
Dependencies
An extension may have dependencies. When installing from within VSCode, VScode installs the dependencies for you. Good example is the Python extension that requires few other extension like Jupyter and pylance.
To handle these two cases easier:
1- Install the same VSCode version on the online (access to internet) computer as the offline (no access to internet) target computer.
2- From within the VSCode, install the desired extension. It will install the right version and all the dependencies.
3- Find the folder where extensions are installed. On windows, it is in: C:\Users\USER_NAME\.vscode\extensions. On Linux, it is ib ~/.vscode/extensions.
4- Copy and transfer the extensions to the target offline computer, in the extensions folder.
5- Restart the VSCode to see the extensions.
The below screenshot shows all the extensions that I transferred to have the python extension available on the target computer:

Uninstall FTP Sync from Visual Studio Code

Is there an easy way to uninstall the FTP-Sync package I have installed in VSC? There doesn't seem to be a remove feature
You can see all installed extensions and uninstall them using these steps:
Ctrl+P(Quick Open).
Enter >Extensions: Show Installed Extensions.
Click the "x" icon next to the extension you want to uninstall.
Here is how is looks: