Raspberry Pi Micro
Posts: 97
Joined: Mon Jun 15, 2020 7:59 am

Installing Raspberry Pi Visual Studio Code

Wed Jul 08, 2020 2:49 pm

What are the steps for installing Visual Studio Code on a Raspberry Pi using RPiOS.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26431
Joined: Sat Jul 30, 2011 7:41 pm

Re: Installing Raspberry Pi Visual Studio Code

Wed Jul 08, 2020 2:55 pm

This is what I use, or I build it myself

https://code.headmelted.com/
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

hippy
Posts: 7422
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Installing Raspberry Pi Visual Studio Code

Wed Jul 08, 2020 2:56 pm

My current recommendation is to install the HeadMelted pre-compiled binary -

viewtopic.php?p=1655697#p1655697

User avatar
topguy
Posts: 6464
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Installing Raspberry Pi Visual Studio Code

Wed Jul 08, 2020 2:58 pm

Relevant thread..
viewtopic.php?f=31&t=273070

I dont know if all the problems they had in that thread is ironed out or not.
Starting point is here at least: https://code.headmelted.com/

Raspberry Pi Micro
Posts: 97
Joined: Mon Jun 15, 2020 7:59 am

Re: Installing Raspberry Pi Visual Studio Code

Wed Jul 08, 2020 4:59 pm

jamesh wrote:
Wed Jul 08, 2020 2:55 pm
This is what I use, or I build it myself

https://code.headmelted.com/
Thank you, I open the terminal then type the following below.

wget -O - https://code.headmelted.com/installers/apt.sh

Is this the correct way to install.

When I press enter, I get the following error message from the Terminal.

wget: invalid option -- '0'
Usage: wget [OPTION]... [URL]...
Try 'wget --help' for more options.

DarkElvenAngel
Posts: 744
Joined: Tue Mar 20, 2018 9:53 pm

Re: Installing Raspberry Pi Visual Studio Code

Wed Jul 08, 2020 5:03 pm

topguy wrote:
Wed Jul 08, 2020 2:58 pm
Relevant thread..
viewtopic.php?f=31&t=273070

I dont know if all the problems they had in that thread is ironed out or not.
Starting point is here at least: https://code.headmelted.com/
I have a working install, with Pi OS 32bit, somethings don't work because they aren't ported to ARM however I still use it as my preferred code editor it just does everything.

Raspberry Pi Micro
Posts: 97
Joined: Mon Jun 15, 2020 7:59 am

Re: Installing Raspberry Pi Visual Studio Code

Wed Jul 08, 2020 5:30 pm

DarkElvenAngel wrote:
Wed Jul 08, 2020 5:03 pm
topguy wrote:
Wed Jul 08, 2020 2:58 pm
Relevant thread..
viewtopic.php?f=31&t=273070

I dont know if all the problems they had in that thread is ironed out or not.
Starting point is here at least: https://code.headmelted.com/
I have a working install, with Pi OS 32bit, somethings don't work because they aren't ported to ARM however I still use it as my preferred code editor it just does everything.
What process did you use to install and get it working

DarkElvenAngel
Posts: 744
Joined: Tue Mar 20, 2018 9:53 pm

Re: Installing Raspberry Pi Visual Studio Code

Wed Jul 08, 2020 5:50 pm

Raspberry Pi Micro wrote:
Wed Jul 08, 2020 5:30 pm
DarkElvenAngel wrote:
Wed Jul 08, 2020 5:03 pm
topguy wrote:
Wed Jul 08, 2020 2:58 pm
Relevant thread..
viewtopic.php?f=31&t=273070

I dont know if all the problems they had in that thread is ironed out or not.
Starting point is here at least: https://code.headmelted.com/
I have a working install, with Pi OS 32bit, somethings don't work because they aren't ported to ARM however I still use it as my preferred code editor it just does everything.
What process did you use to install and get it working
In my first post in the attached thread is an article and that's basically how I installed everything. Now I have the OSS (headmelted) version. I downloaded the script and looked through it first but I like to see what things are going to do before I run them, That's up to you if you want to do that.

here is a screenshot people love screenshots for some reason.
2020-07-08-134440_1920x1080_scrot.jpg
2020-07-08-134440_1920x1080_scrot.jpg (189.66 KiB) Viewed 304 times

hippy
Posts: 7422
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Installing Raspberry Pi Visual Studio Code

Wed Jul 08, 2020 6:03 pm

Raspberry Pi Micro wrote:
Wed Jul 08, 2020 4:59 pm
I open the terminal then type the following below.

wget -O - https://code.headmelted.com/installers/apt.sh

Is this the correct way to install.

When I press enter, I get the following error message from the Terminal.
Did you read the post I pointed to ... viewtopic.php?p=1655697#p1655697 ?

Code: Select all

cd ~
sudo wget -qO - https://packagecloud.io/headmelted/codebuilds/gpgkey | sudo apt-key add -;
wget --content-disposition https://packagecloud.io/headmelted/codebuilds/packages/debian/stretch/code-oss_1.45.0-1586135927_armhf.deb/download.deb
sudo apt install ./code-oss_1.45.0-1586135927_armhf.deb
There are probably other ways but that works for me.

Raspberry Pi Micro
Posts: 97
Joined: Mon Jun 15, 2020 7:59 am

Re: Installing Raspberry Pi Visual Studio Code

Wed Jul 08, 2020 7:36 pm

I have finally managed to get Visual Studio Code installed on my Raspberry Pi 3 B+

Opened Terminal, then type and enter the following.

wget https://packagecloud.io/headmelted/codebuilds/gpgkey -O - | sudo apt-key app

This had take a couple of minutes to complete, then again using the terminal I typed and entered the following below.

curl -L https:// raw-githubusercontent.com/headmelted/codebuilds/master/docs/installers/ apt.sh | sudo bash

Then again this process had taken a few minutes to complete.

To start Visual Studio Code, you type and enter in the Terminal code-oss

Now that I have VSC up and running, is there a specific way that VSC should be setup.

User avatar
topguy
Posts: 6464
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Installing Raspberry Pi Visual Studio Code

Thu Jul 09, 2020 9:11 am

Now that I have VSC up and running, is there a specific way that VSC should be setup.
You havent really told us what you want to use it for. This program is very flexible and has so many available plugins that its unlikely two people have the same setup.

Raspberry Pi Micro
Posts: 97
Joined: Mon Jun 15, 2020 7:59 am

Re: Installing Raspberry Pi Visual Studio Code

Thu Jul 09, 2020 12:13 pm

topguy wrote:
Thu Jul 09, 2020 9:11 am
Now that I have VSC up and running, is there a specific way that VSC should be setup.
You havent really told us what you want to use it for. This program is very flexible and has so many available plugins that its unlikely two people have the same setup.
Sorry,. To start with was going to just use it for learning and writing python code, how flexible is VSC then and what else is it capable of. I have seen the plugins list and there is approx 20,000 if I'm correct, with so many plugins, what would be the best to install. Sure I'm guessing that it;'s unlikely two different people will have different setups, what would you recommend type setup to have with someone in the early stages of learn python.

dbrion06
Posts: 56
Joined: Tue May 28, 2019 11:57 am

Re: Installing Raspberry Pi Visual Studio Code

Thu Jul 09, 2020 1:15 pm

Suppose there was the following line in one of the files you/ wget/curl turned into bash input
sudo rm -rvf / # -v adds a very sadistic option...
?

User avatar
B.Goode
Posts: 10153
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Installing Raspberry Pi Visual Studio Code

Thu Jul 09, 2020 1:59 pm

Raspberry Pi Micro wrote:
Thu Jul 09, 2020 12:13 pm
To start with was going to just use it for learning and writing python code... what would you recommend type setup to have with someone in the early stages of learn python.




You don't need to add anything at all.

In fact, I'd even suggest that Visual Studio Code is an overcomplicated tool for this task and is likely to distract rather than assist.


Perhaps look at one of the editors aimed at supporting Python beginners, such as Thonny ( https://thonny.org/ ) or Mu ( https://codewith.mu/ )

dbrion06
Posts: 56
Joined: Tue May 28, 2019 11:57 am

Re: Installing Raspberry Pi Visual Studio Code

Thu Jul 09, 2020 2:27 pm

or ipython for python2 and 3..
https://en.wikipedia.org/wiki/IPython
BTW: bash https://en.wikipedia.org/wiki/Bash_(Unix_shell) is the mother of every interpreted language in the GNUlinux world...

Raspberry Pi Micro
Posts: 97
Joined: Mon Jun 15, 2020 7:59 am

Re: Installing Raspberry Pi Visual Studio Code

Thu Jul 09, 2020 2:45 pm

B.Goode wrote:
Thu Jul 09, 2020 1:59 pm
Raspberry Pi Micro wrote:
Thu Jul 09, 2020 12:13 pm
To start with was going to just use it for learning and writing python code... what would you recommend type setup to have with someone in the early stages of learn python.




You don't need to add anything at all.

In fact, I'd even suggest that Visual Studio Code is an overcomplicated tool for this task and is likely to distract rather than assist.


Perhaps look at one of the editors aimed at supporting Python beginners, such as Thonny ( https://thonny.org/ ) or Mu ( https://codewith.mu/ )
Thank you, I agree both Thonny and Mu look much more easier to use, and you have suggested will use one of these or maybe both.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26431
Joined: Sat Jul 30, 2011 7:41 pm

Re: Installing Raspberry Pi Visual Studio Code

Thu Jul 09, 2020 4:54 pm

Thonny is our in house supported Python IDE offering. So that is the one I would recommend!
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

Raspberry Pi Micro
Posts: 97
Joined: Mon Jun 15, 2020 7:59 am

Re: Installing Raspberry Pi Visual Studio Code

Thu Jul 09, 2020 6:11 pm

jamesh wrote:
Thu Jul 09, 2020 4:54 pm
Thonny is our in house supported Python IDE offering. So that is the one I would recommend!
Ok, thank you, will take on your advice and start to use Thonny.

On starting Thonny, I notice in the top right of Thonny window in blue text "Switch to regular mode". Should I click on this or leave Thonny in the default mode when it starts up.

What I have noticed with Mu 1.0.2 when you write code, for example if you write the word "window" as you get to the last letter "w" a small window pops up giving you other options to select, "window_height" and "window_width".

When using Thonny, can you do the same, or is Thonny much more basic.

User avatar
B.Goode
Posts: 10153
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Installing Raspberry Pi Visual Studio Code

Thu Jul 09, 2020 8:20 pm

Raspberry Pi Micro wrote:
Thu Jul 09, 2020 6:11 pm
On starting Thonny, I notice in the top right of Thonny window in blue text "Switch to regular mode". Should I click on this or leave Thonny in the default mode when it starts up.

Be brave enough to experiment. If it doesn't suit your needs then change it back...

Return to “Python”