1

When I use vscode Remote-SSH, I install some extensions in SSH server.
But when I connect ssh several days later, the extensions have disappeared which means I have to install again.

  • vscode-extensions like these:
    • Python
    • Pylance
rioV8
  • 24,506
  • 3
  • 32
  • 49
luhao
  • 70
  • 7
  • Does it happen for all extensions? Are there any other than Python and Pylance? Or do you have other extensions that this doesn't happen for? Possibly related: [VS Code does not recognize file extensions. Can't install any extensions](/q/75447496/11107541) – starball Mar 09 '23 at 05:13
  • did you had a VSC update – rioV8 Mar 09 '23 at 05:25
  • Any further info in your output logs (`View > Output`)? Are any of these related? https://github.com/microsoft/vscode/issues/114046, https://github.com/microsoft/vscode-remote-release/issues/1443, https://github.com/microsoft/vscode/issues/168524, https://github.com/microsoft/vscode-remote-release/issues/7961 – starball Mar 09 '23 at 05:27
  • 1. no VSC update. 2. only parts of extensions happened (not local extensions). I have decided to write `"remote.SSH.defaultExtensions"` config – luhao Mar 09 '23 at 05:28

1 Answers1

0

As far as I know, if you installed the extension on the SSH host, it'll not remove your extension.

You can open your USER settings.json and add the following codes:

  "remote.SSH.defaultExtensions": [
    "ms-python.python",
    "ms-python.vscode-pylance"
  ]

In this way, when you use SSH remote connection, the extension will always remain installed. Read document for more information about Managing extensions.

MingJie-MSFT
  • 5,569
  • 1
  • 2
  • 13