10

I compiled VSCode on mac and was able to run the application but noticed that extensions don't work. Navigating to the extensions pane shows - 'No extensions found.'

So I did a grep on the source code for 'marketplace' and found - "build/lib/extensions.js: base: 'https://marketplace.visualstudio.com/_apis/public/gallery',

I assumed that's the URL for the marketplace and tried doing a curl on it to verify if the API sends back a list of available extensions. All I got back was a 404.

So, if I want to get extensions to work on my compiled version, do I have to change the URL? How to I get extensions to work?

C7A
  • 103
  • 1
  • 6
  • 1
    Possible duplicate of ["No extensions found" when running Visual Studio Code from source](https://stackoverflow.com/questions/37143536/no-extensions-found-when-running-visual-studio-code-from-source) – Evandro Coan Jul 24 '17 at 23:13

4 Answers4

12

It's not clear where the product.json file is ...

If you are using VSCodium on Mac the product.json file is located at:
/Applications/VSCodium.app/Contents/Resources/app

Edit the file using VSCodium:

code /Applications/VSCodium.app/Contents/Resources/app/product.json

If you search for "extensionsGallery" you should see:

vscodium-default-extensionsGallery

Replace:

  "extensionsGallery": {
    "serviceUrl": "https://open-vsx.org/vscode/gallery",
    "itemUrl": "https://open-vsx.org/vscode/item"
  },

With:

"extensionsGallery": {
    "serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
    "itemUrl": "https://marketplace.visualstudio.com/items"
},

So you now have this:

vscodium-updated-extensionsGallery

After restarting VSCodium, if we open the Extensions Marketplace: vscodium-open-extensions-marketplace

If you search for your favourite extension or programming language, you will see all of them: vscodium-full-extention-marketplace

nelsonic
  • 31,111
  • 21
  • 89
  • 120
  • Thanks for your response. What would be the path for Linux? – Daniel Diaz Apr 11 '21 at 20:21
  • 1
    @DanielDiaz This is the PATH in Ubuntu: `/usr/share/codium/resources/app/product.json` you can read more in: https://github.com/VSCodium/vscodium/blob/master/DOCS.md#extensions-marketplace – Rogelio Prieto Feb 17 '22 at 02:47
6

See "No extensions found" when running Visual Studio Code from source

You need to open the file https://github.com/Microsoft/vscode/blob/master/product.json on your fork and append the key:

"extensionsGallery": {
    "serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
    "cacheUrl": "https://vscode.blob.core.windows.net/gallery/index",
    "itemUrl": "https://marketplace.visualstudio.com/items"
}

See also the questions:

  1. How do I enable extensions in the extensions dir in OSS Dev mode
  2. Can I put the extensionsGallery on my vscode fork?
Evandro Coan
  • 8,560
  • 11
  • 83
  • 144
  • This answer's reference has changed and `"extensionsGallery"` is removed from `product.json` in the mentioned git repository. However it's still valid. – Alireza Mohamadi Apr 24 '22 at 11:22
2

If you want to solve the issue for archlinux, have a look here => https://wiki.archlinux.org/index.php/Visual_Studio_Code , you have various possible options to solve the problem.

antham
  • 408
  • 4
  • 15
2

It seems that Vscode open source versions (Code -OSS, Vscodium) doesn't use Microsoft extensions gallery by default. Therefore, some extensions will not show up in the extensions tab and the ext command won't work

As @nelsonic mentioned the correct way to fix this in Mac is to edit the /Applications/VSCodium.app/Contents/Resources/app/product.json file.

In Linux, this is quite different. If you are using Code -OSS you edit the following file: /usr/lib/code/product.json.

If you use VsCodium you edit: /usr/lib/codium/product.json

You must change the key extensionsGallery from:

    "extensionsGallery": {
        "serviceUrl": "https://open-vsx.org/vscode/gallery",
        "itemUrl": "https://open-vsx.org/vscode/item"
    },

Before

To:

"extensionsGallery": {
    "serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
    "cacheUrl": "https://vscode.blob.core.windows.net/gallery/index",
    "itemUrl": "https://marketplace.visualstudio.com/items"
}

After

Daniel Diaz
  • 424
  • 6
  • 12