When do I want to install VSCode extensions in WSL2:Ubuntu vs VsCode Windows?

Viewed 2330

Most of my coding is in WSL2:Ubuntu. I typically open a terminal into WSL2:Ubuntu, change to a project directory and then start VSCode by typing code .

When I look for extensions, they appear (?) to install in Windows VSCode itself, and then sometime later, VSCode will recommend installing the extension in WSL:Ubuntu

  • When should I install extensions into WSL:Ubuntu?
  • What do I gain by installing extensions in WSL:Ubuntu in addition to installing it into VSCode Windows?
  • What sorts of VSCode extensions installed into VSCode Windows would not work on WSL2:Ubuntu projects?

If I understand the diagram below, then any extension that operates on code, snippets, formatter, intellisense/kite/tabnine needs to be installed into WSL, but what about extensions that change text colors depending on indent level, or place hints about the cost of an import? Are those "UI Extensions" or "Workspace Extensions"?

enter image description here

And are the answers here good for all remote vscode development or particular to developing under WSL2?

What do I need to understand about VSCode Windows and VSCode WSL2:Ubuntu to grok this?

1 Answers

According to the official docs on this,

If you install an extension from the Extensions view, it will automatically be installed in the correct location. While extensions that affect the VS Code UI, like themes and snippets, are installed locally, most extensions will reside inside WSL.

Related