Running Visual Studio Code on ChromeOS via Project Crostini

I wrote instructions last week on how to get Android Studio to run on ChomeOS via Project Crostini and since then, I have received several requests from readers asking if it is possible to get Microsoft’s Visual Studio Code running on ChromeOS. The answer is yes and here are the instructions

A few notes before I get started:

  • As of this writing, these instructions will only work with the Google Pixelbook. Linux support will eventually come to other ChromeOS devices in the future so this limitation will eventually go away.  You will also need to be running ChromeOS 68 or higher which means you will need to be running the “dev” channel as of this writing.
  • As of this writing, Microsoft only maintains amd64 builds for Visual Studio Code. This means that it is not possible to get this running on a ARM Chromebook at this time. Hopefully Microsoft ports Visual Studio Code to other architectures in the future. Fortunately there are currently no shortages of development tools for Linux.

Installing Visual Studio Code is not as straight forward as installing other applications. You will need to install a few dependencies and setup a new repository. Get started by launching your Linux Terminal to access your debian installation and run the following commands.

sudo apt-get update
sudo apt-get install libxss1 git gpg curl
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
sudo apt-get update
sudo apt-get install code

Once you have run the following commands, you should be able to launch Visual Studio Code by simply running “code” at the terminal or by clicking the Visual Studio Code icon that should be in your launcher.

My initial testing shows that everything is working as expected

Facebooktwittergoogle_plusredditpinterestlinkedinmail

2 thoughts on “Running Visual Studio Code on ChromeOS via Project Crostini

  1. Paulo says:

    Hi Keith, great writeup, got me up and running with VSCode in no time. The one thing that I can’t seem to get working though is the icon in the launcher, it simply won’t show up for me.

    Is there any extra step/option to have linux applications show up there? Do I need to change anything in the .desktop file?

    I’m a bit lost here, any help is appreciated.

    Cheers

    • Keith I Myers says:

      I was working with someone on a similar issue and the only fix we were able to come up with was updating Termina and doing a powerwash. This is clearly not ideal and hopefully it is fixed on the next OTA. You clearly need to backup everything first if you want to do it manually.

      Steps to update Terminal
      1) In a Chrome browser, enter chrome://components
      2) Select cros-termina and select Check for Updates
      3) Perform a powerwash

Leave a Reply

Your email address will not be published. Required fields are marked *