Quantcast
Channel: Hacker News
Viewing all articles
Browse latest Browse all 25817

Visual Studio Code for Chromebooks and Raspberry Pi

$
0
0
Please read this carefully (here be dragons!).

These are automated builds of the open-source edition of Microsoft's Visual Studio Code.

The latest code is pulled on a nightly basis from Microsoft's official repository. If there are updates, the code is built, tested, packaged and deployed. The key feature here is support not only for Intel, but ARM processors, and so these builds can run on a wider variety of systems.

As this project is at a very early stage, and the builds are made nightly, the software should be considered unstable for now. The disclaimer at the bottom of this page covers your use of the scripts and instructions below, and any and all of the packages they reference.

These scripts probably require super-user access to the system in order to, among other things, add the package source to your system and install software, depending on your current user access rights. It is bad practice to run a script from the internet directly with super-user access, so the scripts below do not include an escalation request for these rights (as that is something you should be doing conciously). You will therefore need to manually enter a super-user session. Instructions to do this are included in the steps below.

It is advised that you download the scripts first, before executing them using the instructions below if you are at all concerned about what is contained within them (the scripts have not been minified, so should be easily readable).

If you have not yet set up a chroot on your Chromebook, and/or are not sure how to do so, then you may wish to follow the installation wizard below. If you already have a chroot that you wish to install Visual Studio Code into, please follow the manual installation instructions below.

NEW: Installation Wizard

A guided installation wizard is now available for Chromebooks in the form of a shell script that will perform the following tasks automatically:

  1. Download crouton.
  2. Create a chroot on the local device based on Ubuntu 14.04 (Trusty Tahr).
  3. Install Visual Studio Code into the chroot.
  4. Install git into the chroot.
  5. Create an alias 'code' that allows you to launch Visual Studio Code quickly and easily later.

    To run Visual Studio Code after installation, do the following

    1. Press Ctrl+Alt+T, type 'shell', return, type 'code', return.

The installation has the following pre-requisites:

  1. The Chromebook must be in developer mode already.*
  2. The crouton integration extension must be installed from the Chrome Web Store (and enabled).
* Installing a chroot requires you to put your Chromebook into developer mode, and there are important security considerations to be aware of before deciding to do this, more details of which can be found here.

How to setup Code on your Chromebook:

Below each step is a preview of what you should be seeing on screen.
  1. Install the crouton extension. This allows us to put Code into it's own Chrome OS window.
  2. Press Ctrl+Alt+T on your keyboard.
    Welcome to crosh, the Chrome OS developer shell.
    If you got here by mistake, don't panic!  Just close this tab and carry on.
    Type 'help' for a list of commands.
    
    crosh>
  3. Type shell, then press the return key.
  4. [email protected] / $
  5. Copy the following text to your clipboard:
  6. . 
  7. Paste the text into your shell window from step 3, then press the return key.
  8. Once the installation completes (it will take a while), you can run code anytime by entering the shell and typing the code command. (i.e. Ctrl+Alt+T, shell, return, code return). I'm working on making this less hassle.
NOTE: Visual Studio Code may fail on the first run after installation, giving an error with a red band in the window, but should work fine on subsequent runs. This is a bug I'm looking into currently.

Manual Chromebook installation

To install Visual Studio Code into an existing chroot, simply enter the chroot and follow the standard Linux instructions below, depending on the distribution you are running (YUM or APT-based).

You have two options here. The scripted installation will install Visual Studio Code, and will also set up the package repository so that you can get regular updates. The manual installation section will allow you to just get the latest packages for your architecture and distribution.

(including Raspberry Pis, Odroids and other single-board computers)

Packages are currently available in DEB and RPM format for ARM, x86 and amd64 systems.

You can use the scripts here to install the packages and add their repository to your system.

Open a new terminal. If you need super-user rights (you probably do), then you can enter sudo -s and press return to enter a super-user session. Run the installer for your current distribution:

(including Debian, Raspbian, Ubuntu and Linux Mint)
. (including Fedora, Pidora, Red Hat and SUSE)
. 

Press the return key. Once the installer has completed, you should have a "Code - OSS (headmelted)" entry in your desktop program list.

If for any reason the script above will not work on your system, or you do not want to add the package source for updates, you can get the latest version of the package for your system below.

For either APT or YUM installation, you'll want the public GPG key to verify the package, which you can download here.

(including Debian, Raspbian, Ubuntu and Linux Mint)
(including Fedora, Pidora, Red Hat and SUSE)

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


Viewing all articles
Browse latest Browse all 25817

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>