You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can define the extension kind of your extension using the property extensionKind in package.json.
Following table explains given the extensionKind where an extension can or cannot run. Please read the documentation for more info.
Kind \ Runtime
Desktop - Local
Desktop - Remote
Web - Remote
["ui"]
✔️
❌
❌
["workspace"]
❌
✔️
✔️
["ui", "workspace"]
✔️
✔️
✔️
["workspace", "ui"]
✔️
✔️
✔️
["ui"]: Runs only locally. ["workspace"]: Runs only remotely. ["ui", "workspace"]: Preferably runs locally if exists otherwise can run remotely. ["workspace", "ui"]: Preferably runs remotely if exists otherwise can run locally.
string type for extensionKind is deprecated in favour of above. But you can still provide strings "ui" and "workspace" for extensionKind and will be treated internally as ["ui", "workspace"] and ["workspace"] respectively.
Overriding
Even though an extension defines its extension kind, user or product (VS Code) can override this in settings (remote.extensionKind) and product.json respectively. User choice is given first preference and then for product.json.
Set Up
This needs to be tested in following set ups
VS Code opened locally
VS Code connected to remote server (SSH, WSL, Dev Container)
VS Code Web connected to remote server (See instructions for set up here).
Testing
Come up with a sample extension or use existing extensions with different combination of extension kinds. I have published following test extensions which you can reuse
sandy081.ui-extension
sandy081.workspace-extension
sandy081.ui-workspace-extension
sandy081.workspace-ui-extension
Test that these extensions are enabled as mentioned in above table.
Test the deprecated behaviour that is mentioned above
Test the overriding behaviour that is mentioned above. You can see our insiders product.json for the overridden extension kinds.
Test extensions viewlet that how these extensions are shown and what actions are available when these extensions are installed in different locations. (You should see an install in other side action if an extension is installed in a side in which it cannot be enabled).
Test installing above extensions installs them in the appropriate side
Test installing an UI extension throws error in Web.
Testing #85036
Complexity: 5
Extension Kind
extensionKind
inpackage.json
.extensionKind
where an extension can or cannot run. Please read the documentation for more info.["ui"]: Runs only locally.
["workspace"]: Runs only remotely.
["ui", "workspace"]: Preferably runs locally if exists otherwise can run remotely.
["workspace", "ui"]: Preferably runs remotely if exists otherwise can run locally.
string
type forextensionKind
is deprecated in favour of above. But you can still provide strings "ui" and "workspace" forextensionKind
and will be treated internally as ["ui", "workspace"] and ["workspace"] respectively.Overriding
Even though an extension defines its extension kind, user or product (VS Code) can override this in settings (
remote.extensionKind
) and product.json respectively. User choice is given first preference and then for product.json.Set Up
This needs to be tested in following set ups
Testing
product.json
for the overridden extension kinds.Authors: @sandy081, @alexandrudima
The text was updated successfully, but these errors were encountered: