Can a Visual Studio Code web extension be dependent on other extensions?

Viewed 15

I am trying to develop a Web extension for VS code. It is dependent on other VS Code extensions. In the package.json file, I define the extensionDependencies field to include the unique id of the extension the web extension depends on.

I cannot correctly configure my extension to depend on ANY other extension. For example, I tried to add the unique id for the Prettier - Code Formatter extension, which works on the web, to my extensionDependencies field. When running my web extension in the debugger, I get the error "Cannot activate the 'myextensionname' extension because it depends on the 'Prettier - Code formatter' extension, which is not loaded. Would you like to reload the window to load the extension?"

Reloading does nothing. Please let me know if any of you have experience working with web extensions and have worked through this problem before.

1 Answers

Solved. Feel very silly but you need to test in an actual browser to get the correct behavior. The web extensions docs page does a good job explaining how to do this. Testing from the VS Code debugger on desktop will not work. Leaving this up in case others run into this issue.

Related