8

I opened a remote SSH workspace in VSCode and some of my extensions aren't enabled. For example, I have the Python and Go extensions installed but when I connect to my remote ssh workspace they don't work. The same also happens in remote workspaces that use dev containers or WSL.

How do I enable these extensions in my remote workspaces?

Matt Bierner
  • 58,117
  • 21
  • 175
  • 206

1 Answers1

8

When you open a remote workspace, VS Code runs extensions in one of two places:

  • Themes and other UI extensions are run on your local machine.
  • Language extensions and other more advanced, workspace extensions are run on the remote machine.

UI extensions are enabled by default when you open a remote workspace, but the workspace extensions must be installed on the remote itself. That is why you do not see Python and Go enabled by default in the remote workspace.


To install a locally installed extension on a remote machine:

  1. Open the remote workspace and open the Extensions view. The top section of the extension lists contains that are already installed on the remote (also indicated by the >< badge on the extension entries) , while the Local — Installed section shows local UI extensions along with the workspace extensions that are not yet installed on the remote.

    Extension install locations

  2. In the Local — Installed section, scroll down to see the workspace extensions that are not yet installed on the remote. These are faded out and have a green install button next to them. Here the VS Code Speech is a UI extension that is running locally while the Angular Language Service is a workspace extension installed locally but that has not yet been installed on the remote:

    Extension install button

  3. Use the green install button to install each workspace extension you wish to enable in the remote workspace. Then reload the window.


You can also configure a list of extensions that should be auto installed on SSH or dev container remotes by setting:

"remote.SSH.defaultExtensions": [
    "eamodio.gitlens",
    "mutantdino.resourcemonitor"
],
"remote.containers.defaultExtensions": [
    "eamodio.gitlens",
    "mutantdino.resourcemonitor"
]

These settings take a list of extensions IDs on each extension's details page in the top right, next to the extension name:

The extension ID is to the right of the extension name

Matt Bierner
  • 58,117
  • 21
  • 175
  • 206
  • I'm wondering if the settings mentioned here, e.g. `"remote.SSH.defaultExtensions"`, were removed. They have no effect for me, and they are being flagged as unknown configuration strings. – Kip Jun 22 '19 at 13:47
  • @kip these only work on user level, not project level – Extrawurst Jul 16 '21 at 16:42
  • 1
    to get the extension id i had to press on the cogwheel on the extension's detail page and select copy extension id – Michael Mar 31 '22 at 17:07