대한민국 : 9월 4일 주문 및 입금 건 까지만 연휴 이전 발송 처리 됩니다. (배송일 보장x) / 이후 주문 및 입금 건은 연휴 이후 순차적으로 발송됩니다. Dismiss

Visual Studio Code on XU4 Ubuntu 18.04

When I was a student around 25 years ago, I had to spend over $200 to buy a Microsoft Visual Studio C++ software package.
At that time, I used Windows 3.1 on a blazing fast Intel 80286 8Mhz 16bit processor with 1MB RAM to build a small commercial software as a part-time job.

Today, we can run the Visual Studio on the XU4 Ubuntu Linux.
Visual Studio Code is a source code editor developed by Microsoft for Windows, Linux and macOS.
It includes support for debugging, embedded Git control, syntax highlighting, intelligent code completion, snippets, and code refactoring.
It is also customizable, so users can change the editor’s theme, keyboard shortcuts, and preferences.
It is free and open-source, although the official download is under a proprietary license.

From the VS Code GitHub : https://github.com/Microsoft/vscode/wiki/How-to-Contribute#prerequisites
You need following items.
– Git
– Node.JS, >= 8.9.1, < 9.0.0
– Yarn >= 1.5.0
– Python, >=  2.7 (version 3 is not supported)
– npm
– libx11-dev and libxkbfile-dev for native-keymap
– libsecret-1-dev for keytar

Let’s install the required packages.

sudo apt install git nodejs libx11-dev libxkbfile-dev libsecret-1-dev npm 

And check the versions of key components.

odroid@odroid:~$ yarn --version
0.32
odroid@odroid:~$ python --version
Python 2.7.15rc1
odroid@odroid:~$ nodejs --version
v8.10.0
odroid@odroid:~$ npm --version
3.5.2

“yarn” command in “cmdtest” package was too old which was compatible with npm.
So you have to install “yarn” package manually.

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt
sudo apt update
sudo apt install yarn

And I had the latest “yarn” version.

odroid@odroid:~$ yarn --version
1.7.0

Let’s download Visual Studio Code source from MS Github and build it.

git clone --depth 1 https://github.com/microsoft/vscode
cd vscode
./scripts/npm.sh install --arch=armhf

Then, run your instance with ./scripts/code.sh from that same folder.
You must force to reinstal libgconf2 manually to fix a runtime error.

sudo apt -y install libgconf2-4

The first launching took quite a long time. Be patient.
The performance of source code editor was very good and look-and-feel was very similar to the original Visual Studio.
It’s time to learn how to configure the gcc and gdb command in the integrated development environment.