Saturday, May 4, 2019

Building Visual Studio Code on Jetson Nano

Here are the steps for building Visual Studio Code on Nvidia Jetson Nano.

Install nodejs

Visual Studio Code needs node version between 8 and 10. To install node 10 and yarn:

curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -

sudo apt-get install -y nodejs

curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -

echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list

sudo apt-get update && sudo apt-get install yarn


Install libraries 

We also need some libraries:

sudo apt-get install libx11-dev libxkbfile-dev libsecret-1-dev 


Clone and build Visual Studio Code

In a working directory, clone the source code and build.

git clone https://github.com/microsoft/vscode

cd vscode

scripts/npm.sh install


Edit 2019-06-15: To enable extensions, edit the product.json file and add the following:

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


To run Visual Studio Code:

scripts/code.sh

7 comments:

Stephen Sands said...

This is the clearest explanation. I have spent nearly a week going through various posts and videos all with no luck. Thank you Clarence!

Clarence said...

@Stephen Glad that it helped. Happy hacking~!

Unknown said...
This comment has been removed by the author.
PD156 said...

Thank you clarence.... VSCode installed successfully.
But when I try to add extensions it shows :No extension gallery service configured.

can anyone help me with this...!!!

Stephen Sands said...

I am working on the same issue. Will look today.

Clarence said...

Don't have the machine with me now. But most likely the master branch has extensions manager disabled. Try this:

https://github.com/microsoft/vscode/issues/2647#issuecomment-269403183

Greg said...

Worked for me! Thanks @Clarence!!