VSCode Extension Development Host does not allow enabling extension dependencies

224 Views Asked by At

I am creating a VSCode extension which requires another extension specified in the dependencies section of the package.json file. My extension will get this extension and use its functions. However, the Extension Development Host does not allow the extension to be enabled (i.e. the button for enable is greyed out, the command in command palette does not do anything.

The GitHub issue here: https://github.com/Microsoft/vscode/issues/71194 does not describe how to enable the extensions when it simply doesn't allow you to.

Here is the code in package.json, as outlined by the official documentation:

  "extensionDependencies": [
    "michaelcurrin.auto-commit-msg"
  ],

The code used in getting the extension:

const autofill_extension = await vscode.extensions.getExtension("michaelcurrin.auto-commit-msg")?.exports;

What it says in the Extension Development Host: Error message

Update: I have created a GitHub issue on this.

0

There are 0 best solutions below