Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using extensions in compiled VSCode

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?

like image 742
C7A Avatar asked May 18 '17 20:05

C7A


3 Answers

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

like image 61
nelsonic Avatar answered Sep 24 '22 21:09

nelsonic


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?
like image 25
user Avatar answered Sep 20 '22 21:09

user


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.

like image 21
antham Avatar answered Sep 23 '22 21:09

antham