-
Notifications
You must be signed in to change notification settings - Fork 38.3k
Description
Does this issue occur when all extensions are disabled?: N/A
- VS Code Version: 1.63.2
- OS Version: Web
Issue:
There seems to be a mismatch in details about how to run an extension in a specified extension host versus reality.
In my situation I have an extension which I'd like to run in the following way:
- When run in VS Code Desktop or VS Code with remote, I'd like the extension to execute in the
local extension host. - When run in VS Code Web (Codespaces or *.dev), I'd like the extension to execute in the
web extension host.
Looking at the information outlined here:
https://code.visualstudio.com/api/advanced-topics/extension-host
I believe I need to describe this extension with extensionKind: [ui] to request it is run in the local extension host. The details for this extensionKind explicitly outlines:
In the case of VS Code for the Web with Codespaces, where no local extension host is available, such an extension can not load, unless it is *also* a web extension. It will then be loaded in the web extension host
Which leads me to believe I can also describe this as a web extension as outlined here:
https://code.visualstudio.com/api/extension-guides/web-extensions
Which states:
Extensions can have both browser and main entry points in order to run in browser and in Node.js runtimes.
My extension has both a main and a browser entry point, as this seems to be supported in the link above and I would expect the browser entrypoint to be used in the web extension host and the main entrypoint anywhere else.
When running the extension on the desktop (normally or using remote), this seems to work as expected, however the web flavours of VS Code fail to load the extension with the error:
This extension is disabled because it is not supported in Visual Studio Code for the Web
Question
Before I delve into the (rather complicated) loading code, I'd like to understand the intent here and whether the expectation is that an extension can be setup to run in this way.