visual-studio-codevscode-extensionsvscode-remotevscode-remote-ssh

Why VSCode enters infinite loop showing "extesion is disabled, would you like to enable and open the url?"


I develop an extenison and register onUri to receive the url "vscode://<extensionid>/". I publish the extension to the marketplace. When I open url in my webbrowser, the VSCode will be opened and ask me if need to install the extension. But when I open an remote ssh window (I connect to remote cloud environment) and then open the url in browser, I receive "Extension xx is disabled, Would you like to enable the extension and open the url". I choose "enable" and then after few seconds, the same message occurred again!! It enters to infinite loop……

So I want to ask:

  1. Is a VSCode bug?
  2. How to solve it? Can I in some way make my extension enable in both local and remote?

Thank you!


Solution

  • When the extension kind is 'workbench':

    1. VSCode 1.57.1 ,the infinite loop will occur, I think it is a bug
    2. VSCode 1.65.2 , this problem does not exist

    When the extension kind is 'ui', this problem does not exist in both 1.57.1 and 1.65.2

    So, I finally solved it by adding this to package.json

        "extensionKind": ["ui"]