Visual Studio Code (Update 2024)

Microsoft’s Visual Studio Code is the most popular integrated development environment on the planet. You will see Visual Studio Code referred to as VS Code or simply Code. VS Code supports ARM processors, including the Jetsons! Installation is straightforward, but there are two paths you can go by. One for the Jetson Nano Developer Kit, and the other for later versions of Jetsons including the Xaviers and Orins. Here’s a video for the Jetson Nano install tutorial. Looky here:

Background

The Jetson Nano OS is based on Ubuntu 18.04. Each version of Ubuntu has an associated version of libc which is a system level C library. When Ubuntu upgraded to version 20+ libc changed too. Unfortunately Visual Studio Code relies on libc, so newer versions of VS Code do not work with the Jetson Nano.

However, that’s not to say that there isn’t a version of VS Code that works on the Jetson Nano. It turns out version 1.85.2 is the last version of VS Code that supports it. Luckily for us, it’s in the archives and available for install.

Installation on Jetson Nano

The .deb package to install is currently stored here: https://update.code.visualstudio.com/1.85.2/linux-deb-arm64/stable You can use dpkg to install it.

If you are looking to script the installation, on the JetsonHacksNano account on Github, there is a repository installVSCode. There are two scripts. The first script, installVSCode.sh, will simply download Visual Studio Code 1.85.2 and install it. The second script, installVSCodeWithPython.sh, will download Visual Studio Code, install it, and then download and install the Microsoft Python extension, along with some Python support libraries.

To clone the repository and install VSCode:

$ git clone https://github.com/JetsonHacksNano/installVSCode.git
$ cd installVSCode
$ ./installVSCode.sh

To clone the repository and install VSCode with Python support:

$ git clone https://github.com/JetsonHacksNano/installVSCode.git
$ cd installVSCode
$ ./installVSCodeWithPython.sh

Modify the scripts to suit your development needs. In particular, the Python install script gives an example on how to install an extension from the command line:

$ code –install-extension ms-python.python –force

The name of the extension can be found by looking up the extension in the extension manager of C

Installation on other Jetsons

One easy way to install Visual Studio Code is to go to the Visual Studio Code site, download the .deb for ARM 64, and install it. Just remember to find the ‘Other platforms’ link to take you to the place to download the ARM 64 version. Many of the buttons labelled ‘Download’ download the x86 version of Visual Studio Code (this is for a PC), make sure you find the ARM 64 version (see the video below if you need a better description).

There is great documentation for both installing Visual Studio Code and getting started. This includes video tutorials and a large number of articles for use. Certainly a page worth checking out.

The ARM 64 version runs on the NVIDIA Jetson AGX Xavier, Jetson Xavier NX, Jetson Orin NX, Jetson Orin Nano and Jetson AGX Orin.

In the older video below, we walk through the install process. However, note that for the Xaviers and Orins, if you want to do the install using scripts you will need to look in the Github JetsonHacks installVSCode repository instead of JetsonHacksNano. Looky here:

Script Installation for Xavier and Orin

If you are looking to script the installation, on the JetsonHacks account on Github, there is a repository installVSCode. There are two scripts. The first script, installVSCode.sh, will simply download Visual Studio Code and install it. The second script, installVSCodeWithPython.sh, will download Visual Studio Code, install it, and then download and install the Microsoft Python extension, along with some Python support libraries.

To clone the repository and install VSCode:

$ git clone https://github.com/JetsonHacks/installVSCode.git
$ cd installVSCode
$ ./installVSCode.sh

To clone the repository and install VSCode with Python support:

$ git clone https://github.com/JetsonHacks/installVSCode.git
$ cd installVSCode
$ ./installVSCodeWithPython.sh

Modify the scripts to suit your development needs. In particular, the Python install script gives an example on how to install an extension from the command line:

$ code –install-extension ms-python.python –force

The name of the extension can be found by looking up the extension in the extension manager of Code.

Conclusion

If you program a lot on your Jetson, Visual Studio Code is worth checking out. This is especially true if you use different languages, as you can hop back and forth between them and maintain the same programming development environment.

The post Visual Studio Code (Update 2024) appeared first on JetsonHacks.

Leave a Reply

Your email address will not be published.

Previous post New Silent Hill 2 Remake Patch Introduces Labyrinth Breaking Bug
Next post Three Building Blocks for Creating AI Virtual Assistants for Customer Service with an NVIDIA NIM Agent Blueprint