Visual Studio Code comes to Raspberry Pi

Microsoft’s Visual Studio Code is an excellent C development environment, and now it’s an easy install on Raspberry Pi. Here’s Jim Bennett from Microsoft to show you all how to get VS Code up and running on our tiny computer. Take it away, Jim…

There are a few products in the tech sphere that get me really excited. One of them is Raspberry Pi (obviously), and the other is Visual Studio Code or VS Code. I always hoped that the two would come together one day — and now, to my great pleasure, they have!

VS Code is a free, open source developer text editor originally released for Windows, macOS and x64 Linux. Out of the box it supports generic text editing and git source code control, as well as full web development with JavaScript, TypeScript and Node.js, with debugging, intellisense and all the goodness you’d expect from a full-featured IDE. What makes it super powerful is extensions — bringing a huge range of programming languages, developer tools and other capabilities.

For example my VS Code setup includes a Python extension so I can code and debug in Python, a set of Microsoft Azure extensions so I can manage my cloud services, PlatformIO to allow me to program micro-controllers like Arduino boards coupled with a C++ extension to support coding in C and C++, and even some Docker support. Not a bad setup for a completely free developer tool.

Jim’s Raspberry Pi 400 running VS Code

I’ve been hoping for years VS Code would come to Raspberry Pi, and finally it’s here. As well as supporting Debian Linux on x64, there are now builds for ARM and ARM64 – both of which can run on Raspberry Pi OS (the ARM build on Raspberry Pi OS, the ARM64 on the beta of the 64-bit Raspberry Pi OS). And yes — I am writing this right now on a Raspberry Pi 400 running VS Code!

Why am I so excited about this?

Well, there are a couple of reasons.

Firstly, it brings an exceptional developer tool to Raspberry Pi. There are already some great editors, but nothing of the calibre of VS Code. I can take my $35 computer, plug it into a keyboard and mouse, connect a monitor and a TV and code in a wide range of languages from the same place.

I see kids learning Python at school using one tool, then learning web development in an after-school coding club with a different tool. They can now do both in the same application, reducing the cognitive load – they only have to learn one tool, one debugger, one setup. Combine this with the new Raspberry Pi 400 and you have an all-in-one solution to learning to code, reminiscent of my ZX Spectrum of decades ago, but so much more powerful.

The second reason is to me the most important — it allows kids to share the same development environment as their grown-ups. Imagine the joy of a 10-year-old coding Python using VS Code on their Raspberry Pi plugged into the family TV, then seeing their Mum working from home coding Python in exactly the same tool on her work laptop as part of her job as an AI engineer or data scientist. It also makes it easier when Mum has to inevitably help with unblocking the issues that always come up with learners.

As a young child it was mind-blowing when my Dad brought home a work PC so he could write reports and I could use it to write up my school work – I was using what Dad used at work, making me feel important. I see this with my seven-year-old daughter, seeing her excitement that I use Microsoft Teams for work, the same as she uses for her virtual schooling (she’s even offered to teach me how to use it if I get stuck). To be able to bring that unadulterated joy of using ‘grown-up tools’ to our young learners is priceless.

Installing VS Code

The great news is VS Code is now available as part of the Raspberry Pi OS apt packages. Launch the Raspberry Pi Terminal and run the following commands:

sudo apt update 
sudo apt install code -y

This will download and install VS Code. If you’ve got your hands on a Pico, then you may not even need to do this – VS Code is installed as part of the Pico setup from the Getting Started guide.

After installing VS Code, you can run it from the Programming folder in the Raspberry Pi menu.

Getting started with VS Code

VS Code may seem daunting at first – it’s a powerful tool with a huge range of extensions. The good news is Microsoft has you covered with lots of hands-on, self-guided learning guides on how to use it with different languages and development tools, from using Git version control, to developing web applications — there’s even a guide to learning Python basics with Wonder Woman.

Go grab it and happy coding!

Jim with his arms folded wearing a dark t shirt
There he is – that’s the real life Jim!

Brilliant Jim Bennett shares loads of Raspberry Pi builds and tutorials over on Expecting Someone Geekier and tweets @jimbobbennett. He also works in Developer Relations at Microsoft. You can learn pretty much everything there is to know about him on github.

119 comments
Jump to the comment form

Avatar

VS Code is not open source. It is “Built on open source” but released under a proprietary license (https://code.visualstudio.com/license).

Reply to Matt Williams

Avatar

If you want open source “vscode”, use vscodium!
They also have some ARMhl and ARM64 packages for quite some time now.
https://github.com/VSCodium/vscodium/

Reply to Jens Kuehnel

Avatar

All of the VScode source is available here. https://github.com/Microsoft/vscode. In my book (which might not be the same book as yours) that makes it open source.

Reply to James Hughes

Avatar

FYI open source has an actual definition: https://opensource.org/osd

And whilst the source code is indeed open source, the distributed binaries are not. They are based off the open source code but with additional code added (e.g. Microsoft telemetry services) and they are subject to a different (non-open-source) license, as one of the commentators above has already pointed out.

Reply to Calvin

Avatar

Which is why I said “In my book”….

Reply to James Hughes

Avatar

You do not need to say “In my book” because your definition of open source is the same as everyone else’s. Your use of the phrase is just a red herring, trying to distract attention from your previous false statement “All of the VScode source is available here”

Thus you attempt to prove that VScode conforms to the real definition of open source — but your argument is based upon a lie.

Reply to Nick

Avatar

My definition of open source is pragmatic, not zealous.

Reply to James Hughes

Avatar

Then why do you feel the need to convince us that “All of the VScode source is available”?

Avatar

so ok, your smart. The fact is its free to use and thats all that matters in this context.

Reply to Robin Smith

Avatar

For the future, but I understood what you were getting at!
https://www.slant.co/versus/3575/3579/~mit-license_vs_gplv2

Reply to kevin

Avatar

You’re absolutely right, VS Cod. it’s proprietary – and we should use Open Source programs, just because Microsoft doesn’t support Open Source, but nien continuously ataqua shouldn’t be let into Open Source projects.
Greetings and thanks.

Reply to Juanky Destroyer

Avatar

No. Not all of the source code is available in the vscode GitHub repo. One cannot build the VSCode that is installed with the PiOS package from just those sources. Which in my book classifies it as “not open source”. Far better to install vscodium or build the thing yourself, which is not so hard.

Having said that I love VSCode and don’t much worry about the situation re: using the MS build.

Reply to M. Yun

Avatar

The package is not available on raspbian stretch i believe.

Reply to Daniel

Avatar

You need a fully update / full-upgrade Raspberry Pi Operating System.

Raspbian Stretch is well past its use by date.

Reply to MW

Avatar

Are there any advice on how much RAM you need to have to get a good experience? I’ve not tried it on my 4GB Pi 4 yet but on my laptop (running Ubuntu LTS) with a bunch of Python and GitHub-centric extensions installed I find it’s a race between my web browser and VSCode as to which can consume all my RAM first. Will it run well on the older Pi hardware?

Reply to Nick

Avatar

Well, no wonder, VS code is an Electron app (i.e. a website taped to Chromium, pretending to be a real program).

Reply to BlastFX

Avatar

Yes, trying VSCode on a Raspberry Pi 4 4GB is possible and very quick, too.

Reply to Magnus Peterson Munoz

Avatar

It is good to see this as another excellent option.
Thanks.

Reply to Jeff Davis

Avatar

Very useful and as soon as I get a moment I will install it and start configuring it. I’ve been using Qt creator for a while already, this will b a good addition and some real world IDE experience.

Reply to Anders

Avatar

You if you could just add in in the Recommended Software program you have built in to the OS, that would be even easy as nothing to remember. In the same way we add Mu and Thonny.

And sorry, but the Cognitive load just to learn VSCode and figure out how to do things it quite high compared to the likes of Thonny and Mu. Yes it’s feature (and more) rich, but it’s interface it not inviting. You sort of need to know what you are doing to understand it.
As someone that has tired (and can just use it) and seen people give up.

Reply to ben

Avatar

I really like it if I can just use any old text editor. No need for color coded syntax or debugger. It would be nice if CLI instructions for compilation is available for all languages. It saves on computer specs requirements as well.
Not everyone has the smarts to use complicated IDE. So many tried and failed, as Ben noted. Do people forget that they are once beginners?

Reply to Harry Hardjono

Avatar

I found pycharm even worse. I’m going to give code another try, though I expect I’ll migrate back to thonny as it’s so simple and easy to use and works well with my ESP modules as well as the Pico.

Reply to Martyn Cole

Avatar

Agreed, far too complicated. Why bother with this when you have Geany, Thonny, Blue java, etc. easy to learn and does most of everything you need. VS seems to be win10 orientated, and like win 10 crashes when you least expect it.

Reply to John

Avatar

Yes, i would definitely agree with that sentiment. Mallet to crack a nut comes to mind in this environment but a useful skill to acquire for budding techies.

Reply to Robin Smith

Avatar

I really don’t like the fact that a Microsoft repo was added automatically to my Pi, I would prefer that RPi foundation had used VSCodium through the regular repos, and those who wanted MS binaries could add that repo on their own Pi.

I know it’s probably not the case, but it strongly gives the impression that MS bought the leadership on RPi foundation.

Reply to Dan

Avatar

I think vscode looks more open source then some of the other stuff that gets shipped with Rasbian. So in itself I don’t mind getting anothe closed source bit added.
But it would be cool if someone can choose a clean install that has no proprietary stuff included at all.
Just a thought, nothing fancy.

Reply to Hugo van der Kooij

Avatar

I agree Raspberry should give users the choice of using an OS without the MS repo and other Proprietary software (looking at you wolfram)

Reply to Malcolm

Avatar

This is actually one of the most reasonable responses. Everyone who gets super jammed up about “closed source” repos being added probably are running a ton of proprietary drivers and don’t even realize. I get the FOSS philosophy but the Pi foundation is about education and learning to code. VS Code is a premier IDE and it’s completely free. Shipping this repo makes sense in line with the foundations mission.

Reply to Dan Decker

Avatar

Sure, but make it optional. Since the foundation’s aim is to promote education and learning, for those that want the Microsoft repository instruction should be provided as to how to add it – and the trusted key. I certainly learnt a bit when I removed both from my PiOS. And I may well tweak my PiHole to make sure it can’t come back. Lest not forget Microsoft is the “M” in “MAGA FT”.

Reply to Colin Giles

Avatar

I agree with you but I think that Raspberry should take into account that, while they are an educational organization, it’s the maker community who made the RPi famous and I see that most makers (myself included) support the FOSS philosophy and aren’t very happy with VSCode on RPi. So, while Raspberry targets education, it’s the makers that really use it.

P.S.: I know that VSCode isn’t the only proprietary component, but blobs and drivers are in the nonfree not the main component. Also VSCode could compromise user privacy.

Reply to Malcolm

Avatar

Yes. agreed absolutely

Reply to Robin Smith

Avatar

One thing I like about a fresh install of Ubuntu 20.04, is that it puts the highly-user-friendly privacy controls right in front of the user’s face, **right upon first boot**. This makes for a very easy opt-out of any telemetry, etc. Privacy-lovers really dig a feature like this.

@Jim Bennet, since you work for Developer Relations for Microsoft, I wish to respectfully request, on behalf of the privacy-loving, and privacy-sensitive Linux community, that VS Code do the same sort of thing upon first launch of VS Code: **please similarly put those telemetry options right in front of the user’s face, facilitating a super-easy opt-out of any and all telemetry features, in a single click. Please don’t require the user go searching and hunting as to where to turn the telemetry off.**
Thank you, and good day.

Reply to Esbeeb

Avatar

Proprietary soft with tracking included, eat or get silenced.

Reply to Tom

Avatar

+1. Your comment and my reply should be removed soon so that there remains no evidence anyone is bothered by this.

Reply to John

Avatar

Hardly worth pointing out, but if you don’t like it, you really don’t need to use it. Using it is YOUR choice. We are just pointing out you can use it should you so desire.

Reply to James Hughes

Avatar

I wonder what will happen when they find out uf2 is a Microsoft thing too.

Reply to FluffyChicken

Avatar

Not really. You silently added Microsoft’s repo to everybody’s install of Raspbian. Now at the very least Microsoft gets a ping from every user who runs apt update and at worst can put up fake packages.
All without the user doing anything to consent of even having a choice.

Reply to BlastFX

Avatar

I hope for your sake you are using proton mail, duck duck go and Firefox. That you exclusively use a VPN with your own DNS resolution and that you exclusively use FOSS. Otherwise this comment could be construed as contrarian.

Avatar

Exactly. By including the Microsoft repository in the Raspberry Pi OS the company has additional telemetry to track users of the Pi, which it can aggragate with use of Bing, Edge, Skype, Office 365 and now VSCode. Privacy is one of the main reasons open source is popular. Hence VSCodium exists. Capice?

Avatar

The trouble with this logic is that the act of doing an upgrade (pings rasbian servers) or downloading a new raspbian version is consent. If you log into Facebook, you consent to their terms, that’s the nature of something made my someone else. You don’t want to consent to their terms, make your own operating system. That’s to much effort? Well then consent or don’t use a computer.

Avatar

Except that every time you apt update it pings Microsoft repo, allowing them to build a profile of raspberry pi users if they so wish.

Reply to John

Avatar

Just use VS Codium if you’re that paranoid.

Reply to Cris

Avatar

Caring for your privacy isn’t paranoid. Some people called as paranoid when we said that MS compromises user privacy, but we were right as Edward Snowden showed us. There are many reasons to worry about MS and their handling of Personal Data.

Reply to Malcolm

Avatar

I see a lot of misinformation in this article. You should know that vscode is not open-source nor free software. While the source code is distributed under MIT License the binaries here aren’t completely open-source because of the proprietary telemetry. This leads to the other problem of vscode: telemetry. I believe that it greatly compromises user privacy if Microsoft (who has a history in compromising our privacy, remember PRISM in 2013) knows every customization in my editor and even recording the keystrokes when you write code.
In addition having the microsoft gpg keys in rpi-os makes every ms repo trusted which greatly compromises user privacy.
Also I think that it is wrong for RP Foundation to put a nonfree text-editor in the main component (it should be in ‘nonfree’) and not even notify the users of this change (The repo was added before this post). All in all I believe that the Foundation should let users know of this change, because the community is what made RPi what it is today.
This made me lose trust to the foundation.
I am leaving RPi OS for an OS and a foundation that cares for the community’s privacy.

P.S: If you want a text-editor for Pico you can use VSCodium which lacks telemetry.

Reply to Noctuam

Avatar

Any easy way to opt-out for this feature, and also avoiding having a Microsoft repo added ?

Reply to Aniran

Avatar

Sometimes I really don’t understand some comments.
Indeed, it’s a good thing to promote full open source softwares.
VSCode is really a great IDE. It may doesn’t promote full open source by itself, but should allow access for more developers, to make softwares.
Don’t forget it’s just a tool, feel free to use it or not, to make open source code with it or proprietary. Freedom is important here.

Reply to laurent

Avatar

How about privacy: freedom _from_ data collection by Microsoft?

Or the new, deliberately proprietary Python Language Server—sounds like an attempt at lock-in.

Reply to David

Avatar

I don’t really have a problem with them including the repo for VS Code or with people using it. However, this article says “VS Code is a free, open source developer text editor” which is untrue. It is not “open source”.

Reply to Matt Williams

Avatar

It does seem that some folks don’t care about privacy until Microsoft are involved. Perfectly happy to let telemetry go to any number of big tech raptors, but mention Microsoft and people suddenly become sanctimonious.
In order not to be hypocritical, we need to consider many other areas of our lives where there is telemetry building profiles.

Reply to Anders

Avatar

It’s not just the fact that the software has telemetry, but the fact that they now know every time a machine runs apt update, the fact that the repo AND it’s key were added silently and forcefully, and that it’s This specific software. Why not for example docker repo? Or any other repository with popular developer software? Why the lack of transparency?

Reply to John

Avatar

They know every time a machine runs apt-update in the same way that you know that a grain of sand moves when you see the wind shifting a dune.

Avatar

That’s a really silly remark Anders. If only there was a unique identifier to a grain of sand which is sent along a packet over the internet… One can’t help but wonder how do those packets know where they come from and where they’re going.

Avatar

Do you imagine there are geeks in Microsoft watching your unique ID and every time you apt-update they are all high fiving each other and shouting “HEY John’s just updated again!”.

In fact, it’s just a stat in a billion stats, they all get rolled up into a analysis chart which shows MS execs how things are going. A measurement of a massive aggregration. It’s our extreme conceit-cum-paranoia to think that they are interested in us as individuals.

Avatar

No Anders, I don’t know what they do with that information. And neither do you.

Avatar

It (the repository and the key) should be optional. If they add this repo today who’s to say they won’t continue to add repos? What is the criteria? Why this specific repo? And why not just announce it rather than silently shove it down our throats?
It just feels incredibly shady.

Reply to John

Avatar

vscode is not free open source software (foss). there is probably no problem that children or newbies in programming can use convenient learning tools, but for everyone else, using proprietary software can be a negative factor when choosing an operating system. few people want to get used to a tool that in the future may be subjected to the EEE strategy from Microsoft. IE browser, silverscript platform, nokia are examples of this.

Reply to jt3k

Avatar

It doesn’t matter to me if it is really “open” source or not. I don’t have any expertise to peek in the source code and understand if the source code is real or not.
I admit that I want free (as in beer) software, not “free as in freedom” software. If it comes compiled, better. And it comes from a somewhat reliable source.
Ah, but someone can say that Microsoft isn’t a reliable source? Maybe. But I’m a part-time Windows user, too, so, it will not be the first time that I’m using software from this vendor.
People like to complain.
It’s nice that this software is available to RPi and I praise the Foundation for adding the repository to my sources.list.

Reply to Manoel

Avatar

This is a poor move on the foundations part, it undermines all the good they have done making IT in schools about learning to writing code rather than using MS products. There is no need for such an IDE to teach coding, all it will do is make the MS way, the only way children expect to code. This is just like the years of forced use of other MS tools, now means most children and young adults equate writing documements to exclusive use of MS tools. MS want this to be the same for software. Exclusive use of one suppliers tools is not preparing people for the workplace, its conditioning. I wont even mention the awful way this has been introduced, breaking the trust I gave to the foundation to provide software on my PI devices.

Reply to Paul

Avatar

It’s an excellent IDE to teach coding. It offers GIT integration, it’s flexible for language and compiler and it is likely to be encountered in the real world of career coding. It’s also increasing on Uni Computer Science undergrad courses.

Reply to Anders

Avatar

Ah, paranoia!
Having lived through the days when Microsoft behaved as an ethically challenged organization (I am being politically correct here, many of my older wizard friends would have called MS a criminal conspiracy, at times with considerable justice) I fully sympathize with those who express discomfort, if not outright nausea, at the inclusion of VS Code in the previously (relatively) ‘pure’ Raspberry Pi project. However, I observe that the current leadership of MS has changed course radically, embracing open source projects and making major contributions to the ecosystem. Admittedly this is business realpolitick–MS management realized it could not beat FOSSH and thus decided to join it–but I believe us wizards must accept, as we have with the involvement of IBM (also once unethical in its behavior), that cooperation, collaboration, and mutual support are much better than promoting (as IBM and MS used to) fear, uncertainty and doubt. As for the telemetry–if MS wants to know who is using this clearly valuable new tool, why not let them.
In passing, I note the very real possibility that future versions of Windows (an OS that mostly works, but occasionally irritates the heck out of us wizards) may well be based on the Linux kernel. Having said that, I also note that, with current hardware technology now bouncing off the upper limit of what may be achieved with Silicon based technology, that it may be time to revisit the whole topic of operating system design and implementation, particularly in view of what might be achieved through use of (older) concepts of I/O channeling and synchronous but coordinated execution. Yes, at times what was old becomes new again….

Reply to Stuart Andrew Jones

Avatar

We as a society do not forgive individuals with criminal records who did the crime even after they have done the time. We take away their rights, such as gun ownership, access to the job market and the right to vote. For some offenses, such as sex offenses they are required to register. We never forgive these criminals even after they’ve reformed.
Microsoft has been convicted of crimes as well. See http://techrights.org/2020/01/08/microsoft-criminality/ for example. Lives and businesses have been destroyed along the way. Why forgive Microsoft just because Satja Nadella says his company is now in love with Linux? Many do not forgive.
This whole business is very sad. IMHO the individuals that work at Microsoft are honest, skilled, caring hard workers, a credit to their communities. But somehow the beast that is Microsoft does not reflect this. So we see the Raspberry Pi foundation putting a Microsoft repository into the OS and people react negatively, as they should. Which is really too bad because VSCode is tecnically a very nice tool.

Reply to John Blommers

Avatar

For me, the issue isn’t making VS Code available, it’s the forcing it on my systems, it’s the telemetry that I did not agree to, it’s the fact that this was done silently.

Well, the cat is out of the bag, so the saying goes and now the trust in Raspian has been compromised.

Reply to Rodney

Avatar

Does it now run on Raspberry PI Zero?
I found it useful when first debugging prototypes on the Zero on the bench to be able to have the GUI loaded and have all the windows on the same screen without needing a whole other machine to SSH in but found lack of support for the same VS Code I was using on the Mac and Windows to be a pain. So I ended up with a Pi 4 to do the prototyping and debugging and then verifying on a (headless) Zero to finalize.

Reply to Cade Roux

Avatar

Such a shame! You injected a repo in your uses computers without telling them, and denied anyone commented on how this is privacy-invasion and now announcing it like you conquered Mars. This blog post should’ve been an apology to your users for not informing them in advance about your action as well as giving them the option to turn it on for the current users, even if you decide to default it to on for new users.

Reply to Mahmoud

Avatar

Since Raspberrypi is explicitly targetting kids, I think it’s a big moral fault to expose them to the Microsoft’s telemetry and spying. Every time a Raspbian device is updated it will ping a Microsoft server. Microsoft is gonna empower its footprint database quality to track people on the net.
Using https://vscodium.com/ would have been a better choice.

Reply to Apichat

Avatar

You mean the kids are are using XBOX, MS Windows on Intel PC, and Android phones?

Reply to Anders

Avatar

No Xboxes or Windows in this household. That is what the Pi is for to provide a more educational alternative for the kids to spend their time on which they love. As for phones, after making sure to only buy ones that are listed on LineageOS those get re-flashed immediately to run a completely open source system.

Reply to Henry

Avatar

But it’s not all about you Henry.

Reply to Anders

Avatar

This is awesome news! Now all I need is a version of Cura that works with the pi, and I’ll never have to open a laptop again for all my 3d printing needs!

Reply to LenM

Avatar

A very welcome addition: great opportunity for kids to get a head start.
VS Code is widely utilized in the tech industry from full-on DEVs to IT teams and everybody in between.

Reply to minijohnny

Avatar

There’s been an ARM version of VS Code since at least April 2020 last year when I compiled my Asteroids game on a Pi and blogged about it (see https://learncgames.com/building-asteroids-on-a-raspberry-pi/). I got that VS Code from the site code.headmelted.com but when I just checked it no longer exists. I suspect after the official Microsoft ARM version appeared there was no further need for it. Thanks to Jay Rodgers who built it. I found it from a post by Scott Hanselman in February 2020. https://www.hanselman.com/blog/how-to-install-visual-studio-code-on-a-raspberry-pi-4-in-minutes

Reply to David Bolton

Avatar

Hi David,
Just want to say that your book is an excellent tutorial for SDL2 programming. I’m surprised that it’s not marketed as such. I hope that’s still true on your Raspi programming book, and that you give some thought about it.
Also, I wonder if Raspi Zero is in your radar, because that is what I’m using most of the time. I’m not too hopeful since you’re using VSCode, but at least give it a consideration for those of us who code on the go, and need to go as small/light as possible, including power supply.
I bought your ebook today. Thank you and have a nice day!

Reply to Harry Hardjono

Avatar

Do you have python code along with the kits ?

Reply to Kalyanaraman Santanam

Avatar

Please revert this change. Please allow the VSCode repository package and GPG key to be *optionally* installed by those who want it, rather than force-installing it to everyone without consent. I do not wish to send any third-party any additional information about myself or my systems than what they already collect.

Reply to b3

Avatar

As Raspberry Pi is mostly targeting children, it is disgusting at best to let microsoft track them. Vscodium would have been much better choice!

Reply to Michal Szymura

Avatar
Avatar

That would be children who are using XBox probably outnumber children using Pi by an order of magnitude.
Disgusing to let them use Xbox.

Reply to Anders

Avatar

“Disgusing to let them use Xbox” I agree with you Anders, but not to the extent of using such a strong word as ‘disgusing’ ;) ! From an educational point of view it is much more useful to invest in Rasperry Pi and some HATs. What I loved in the Raspberry Pi Foundation was the spirit of teaching kids what is inside the ‘black box’. I am sure that they will use this as a great learning opportunity for kids and explain what is under discussion. This will empower them and help them acknowledge different and subtle ways data is collected and sent, regardless of the intention. :)

Reply to Altamiro Machado

Avatar

“With a great power comes great responsibility”

Looks like some one @ raspberry Pi foundation forget about it and start making decision for their users. Even on headless machine they pushed this telemetry machine which CAN NOT run there.

History is repeated: https://en.wikipedia.org/wiki/Embrace,_extend,_and_extinguish

Very disappointed, going to remove Raspberry Pi OS in our tech school.

Reply to Alex

Avatar

For some reason I get this error today.
E: Unable to locate package code

Reply to Ricardo Licon

Avatar

You need to fully update Raspberry Pi Operating System:
sudo apt update
sudo apt full-upgrade

Reply to MW

Avatar

I do not mind proprietary software. What I DO have problems with are any software and companies tracking me, especially without stating up front or providing any easy way to disable all tracking. I will not install, use or promote such software. Windows 10 was the last straw. Having to answer a 100 different questions about what private information to deny BEFORE even getting to the desktop is very annoying. But on top of that, after answering NO to all the questions, there are still many services like Windows Defender for which there is no easy way to disable it or prevent it from sending “suspicous” files to Microsoft.

Therefore on a Linux operating system I expect more control over such settings. For non-free software that I decide myself to install I am used to instructions specifying how to download a deb file or being provided steps along the lines of:
sudo add-apt-repository repository_url
sudo apt update
sudo apt instal package_name

So finding out that Rasberry OS will now automatically add a repo for a vendor known to step on the privary rights of users, for software I will not be installing, is very alarming! This may have been unintential on the part of the Pi Foundation with their trusting nature, but many users do not give Microsoft that benefit (look no further than Windows or Office or IE for why). I do not know if this will mean it will be soon necessary to migrate over to Debian proper on the Pi if this continues.

Reply to Locke

Avatar

This does not disable the “telemetry” sent by Raspberry Pi OS to Microsoft when `sudo apt update` happens. Plus there is no guarantee that these telemetry settings don’t revert back to the “on” state after an update. Or that a new telemetry item is crafted that defaults to “on” after an update to keep the telemetry flowing. This is a cat and mouse game. There should be just one switch to turn it all off. Permantly. Like macOS does. Like Linux does. Capice? We don’t have that. We have MSFT’s dismal past behavior hanging over the entire industry. Satja Nadella posturing that he loves Linux has the foul stench of desperation and hypocrisy about it. That is why all the negative comments. And they are not going away.

Reply to John Blommers

Avatar

VS Code is great, I use it on all my development machines. What is NOT great is silently adding the repo and the gpg key *even on RasPiOS Lite*. Lite has no desktop! I have about 10 Zeros with RasPiOS Lite doing various stuff and now, whenever I update, they all have to ping Microsoft for absolutely no reason. Well, no reason to me…

Please inform us how to best reverse this in a way that is both permanent and will not break future updates.

Reply to ED

Avatar

I am happy with this choice.
you worry about telemetry but maybe you use Alexa, Google, vacuum cleaner robots and many other devices that use telemetry and do not expect it.
Let the users choose, if you don’t want vs code don’t install it.
I want it to work with rpi instead.
good life

Reply to Marco Lai

Avatar

Easy step to follow. I don’t face any problem. Thank’s for the information.

Reply to Kaashi

Avatar

To all those who don’t want to use vscode just remove the link.
sudo rm /etc/apt/sources.list.d/vscode.list

Reply to Milliways

Avatar

So my Raspberry Pi 400 doesn’t have the Microsoft repositories included. I can’t just ‘sudo apt-get install code -y” and have it actually install. You might need to update the article to included either grabbing it from git, or to edit the config to include the microsoft repositories.

Reply to John Sandlin

Avatar

You need to fully update Raspberry Pi Operating System:
sudo apt update
sudo apt full-upgrade

Reply to MW

Avatar

Tried to install VS on my Raspberry Pi4 4GB but when I typed “sudo apt install code -y” in terminal it just says “E: Unable to locate package code”.

Reply to Ry's Pi&DIY

Avatar

I’m sure this will get ignored but could Jim Bennett kindly tell us what extensions they use? When I try to follow C coding in VS Code guides, there are half a dozen extensions that people install. By some random person and no source. So it would be nice to hear from a Microsoft official, thanks.

Reply to John

Avatar

I use the Microsoft C/C++ extension:

https://code.visualstudio.com/docs/languages/cpp

It works perfectly for me. I also couple it with PlatformIO for embedded development:

https://platformio.org

PlatformIO is dependent on the Microsoft C/C++ extension, so installing PlatformIO installs the C/C++ extension by default.

Reply to Jim Bennett

Avatar

Hmm..I tried that about four months ago on Linux/Mac and I kept getting errors. Tried again today and runs fine.

Thanks for the reply!

Reply to John

Avatar

It is time to use another Linux distribution.

Reply to Marco

Avatar

Children, teachers and hobbyists alike will follow the foundations documentation to get the Pico up and running.

Many of them have no real choice because they do not have the time nor the skills to deviate from this path.

Their trust in the foundation’s integrity is part of the “installation requirements”.

I am very disappointed to see Microsoft running telemetry in schools and homes supported by the foundation.

I for myself fight tracking whereever I can using VPN, Tor and letsencrypt.
I encrypt my email whenever the receiver provides me with a public key.
I use ad blockers. I use duck duck go instead of google.
I delete my browsers history and cookies on every shutdown of the browser.
I prefer firefox over chrome.
I use Signal instead of WhatsApp whenever my contact is reachable via Signal.
And so on and on and on…

Very often my struggle to prevent data from beeing gathered in hazardous amounts may be far from perfect,
but this is no excuse for the foundation to give in.

Reply to Georg Bißeling

Avatar

Gosh, what a heated comments section. Personally I’m very glad to be able to use the same code editor on Pi that I use everywhere else so I’m very glad of the addition.
For those who worry about it not being entirely open source, well, it’s an interesting point, but then as I understand it the VideoCore stuff that underlies the Pi itslef isn’t open source either so it kinda comes with the teritory.
With regard to Microsoft’s attempt to track everything I do, for me, with my Android phone and Windows PCs, that’s a world I’m already in, though I do take some precautions to reduce nuisance adevertising etc. If you don’t like having the repository on your machine just remove the .list file in /etc/apt/sources.list.d. I kind of agree that maybe it should have been more optional. So, Raspberry Pi Foundation, why not remove the repository .list file from the standard images then add a ‘code’ stub programme in the usual raspbian repository that puts up a warning and, if accepted, adds the Microsoft repository and installs ‘code’ proper from that, then people can make an informed choice about it up front and your installation instructions remain the same. It would seem like a lot more sensible option and save folks throwing out their teddies in disgust.

Reply to Mark Shuttleworth

Avatar

If you have the skills to install VSCode on your other platforms then you have the skills to install it on your Pi and as a VOLUNTARY option. It is not FOSS and should not be there by stealth in this way.

Reply to John Spriggs

Avatar

I’m not sure I’d classify installing Code on other platforms as requiring skill! It’s a download and a double-click install. It used to need some skill to install it on a Pi, which is why I like that it has been made significantly easier. BUT, I do agree with you that it should have been made voluntary, which is why I say there should be a stub programme in the main repository that gives you a warning that, if accepted, then adds the MS repository and installs Code for you from that. When it comes to stealth non-FOSS software, the VideoCore firmware which allows Linux to talk to the hardware is non-FOSS and has been since day one, so there has always been non-FOSS software on every Pi. I believe Mathematica is also non-FOSS and is in the main repository. So I’m really not sure FOSS/non-FOSS is part of the problem, but I can understand that many regard Microsoft’s not-quite-open-source, sneaky-telemetry approach with deep suspicion, hence why it should it be voluntary.

Reply to Mark Shuttleworth

Avatar

VSCode is largely open source, it is even promoted as open source. Not for VideoCore or Mathematica, nobody claims that is FOSS.
Apparently Microsoft sneaks in proprietary code for telemetry and tracking and still promotes it like open source. Why doesn’t Microsoft offer a 100% open source install?
@Jim Bennet?

Reply to Aardappeltaart

Avatar

Excellent news. Up till now been building my own version with various levels of failure. :D
As for all the moaners, I prefer to get on with my work than to worry if the lift (elevator) is open source or not. ;)

Reply to Richard collins

Avatar

“There are already some great editors, but nothing of the calibre of VS Code.”
I don’t think this is true. Vim and Emacs have been available on the Pi for a good while.

Reply to Tom

Avatar

Definitely will give it a try. I am an Atom user at work and on my laptops at home, but have messed around with VScode. I think I need a tutorial or two on how to use an IDE over a fancy text editor.

Reply to Gareth Qually

Avatar

Quite a few comments here saying to “just use vscodium”.
Well, I used it for ages for the stuff I do with PlatformIO. After an update to vscodium, I had to reinstall some extensions, one of which was PlatformIO. It could not be found!

I’m not 100% sure why, but I believe it was some terms and conditions of using Marketplace. Maybe on the side of vscodium, maybe on the PlatformIO side, regardless, vscodium was no longer an option for me.

I installed vscode and disabled the telemetry in the settings. Thete are two options to disable, just search for “telemetry”. Regardless, because I’m running PiHole, it blocks the telemetry destination anyway.

Vscodium, while great, might not be suitable for everyone given the “Marketplace” changes.

Cheers,
Norm.

Reply to Norman Dunbar

Avatar

With so many other good text editors out there (Geany, Kate for example in the GUI world), I really see why we have to bring M$ VS baggage into the mix on the Linux side. Especially ‘pushing its use’ (which is how it comes across to me)…. Even on Windows we have Notepad++ in lew of using VS. I’ve used/use VS in the Windows world because I have too at work now and then, but I find it overly ‘complicated’ and slow to use compared to Notepad++. Especially, when in the Linux world, you can simply edit a source file with your favorite text editor, kick off ‘make’ from the command line, and (in this case) copy/paste the executable to the Pico. It just doesn’t get any easier for writing ‘C’ code (or Python). Nor does a text editor need much memory run.
Sometimes I think we over complicate what we are attempting to accomplish. But that’s just me :) .
BTW, I am kicking the wheels of a Pico from my Ubuntu 20.04 workstation . I haven’t used any of my RPIs for development as they run headless here and accessed via SSH. The process would be the same on the RPI, if you used a local monitor or setup a remote desktop with VNC of course.
I did test uploading a Pico from an RPI the other day using the command-line by using just ‘mount, cp, and umount’ for kicks. It works too. I was just a bit more involved, as I had to first sftp the Pico executable to the RPI first, and then ssh into the RPI. Using fdisk find the /dev/sd[x]1 device to mount before doing the copy.

FWIW, the best IDE I ever used was Borland’s Delphi/C++ IDE back when. That was a fast, intuitive, and productive environment.

Reply to rclark

Avatar

I fully understand why some people are excited about this. I really don’t care much one way or another except I was horrified to find my Pi pinging an M$ server. It would have been nice to have the option to opt in. That said, it’s silly easy to opt out.

sudo rm /etc/apt/sources.list.d/vscode.list
sudo rm /etc/apt/trusted.gpg.d/microsoft.gpg
sudo apt update
Just like that, problem solved.

Reply to James Carroll

Avatar

Thanks to Jeff Geerling I learned this news. My raspberry have unattended update active because I use it like vpn/dhcp and need latest security updates. I have immediately executed the commands that you suggested. Now I need to create a script to execute this steps in every new raspberry I will install. I am really angry about this choice made by the foundation. Why not choose VSCodium for this purpose?
I am really thinking to change linux distribution for my next installations. I hope they will remove this in the future because I think it is unfair to the community!

Reply to Michele

Avatar

64 bit Ubuntu works very well on the Pi 4. There are several other Linux distros that work as well but other than Ubuntu most of them have YouTube issues. For everything else though there are a lot of options.

Reply to James Carroll

Avatar

Removing the microsoft signing key doesn’t solve the larger problem. How did the key get there in the first place. The issue is that some people have expectations about who will get signing keys, and for what, as RPF can add new keys at will. If RPF cannot be trusted to do what is expected, then one has to remove any keys that might enable more keys to be installed.

Reply to Some Guy

Avatar

Great news! Thanks! It saves a lot of my time by developing on Rasp in java ;)

Reply to Freddy

Avatar

this article would have been a good platform for the RPF to divuldge the microsoft repo. no i do not think it’s evil, but I think it’s existence and the good reasoning behind it’s existince should have been elaborated upon. it’s just a missed opportunity to demonstrate a bit of transparency. again, i don’t feel at all slighted by the inclusion of the ms repo for the benefit of vscode in rpios… but some do, so imo it’s just prudent to dedicate a few lines in the article to the subject.

Reply to SonoraTechnical

Avatar

I could not believe it having just read this news here. But there it was vscode.list sitting on my Pi with Microsoft within. If I did not check here I never would know. Was anyone else aware of the ties between Raspberry Pi and Microsoft? Shocking to find this sudden new change. How is it possible Microsoft have forced to give preferential treatment and have to link them in the OS like this now for all Pis.

Reply to Fedrico

Avatar

Microsoft doesn’t have preferential treatment more than any other non installed applications that have a repo link. I don’t think you’ve thought too hard about this subject:

https://arstechnica.com/gadgets/2021/02/raspberry-pi-os-added-a-microsoft-repo-no-its-not-an-evil-secret/

Reply to Eric_S

Avatar

All those pointing out that adding the repo is harmless like this article are missing the point. The main issue is the moral aspect of remotely exerting a change without any prior knowledge to a personal device one bought and already set up in a specific way. This is the first time this has occurred for a repo that was not from Raspberrypi.

However forget for a moment that it was microsoft.com repo. To illustrate the point, change the repo to an x-rated site or to nazi.com that had been pushed instead. Even though they are still harmless based on the same reasons being given, there would have been no question to people objecting.

Obviously there would still be those who would not care, but wanting to be associated with x-rated.com is a personal preference. That being the case for x-rated.com, there is no argument for any other repo as well. Especially for a repo that had never been there before. If a Microsoft repo had been added from the start of the Pi, then people would have upfront information to determine the position of the product. That is a choice then whether to purchase it in the first place, to install and back the Pi Foundation.

No one can argue that any choice was given here. Sure the Pi team can do whatever they want, but many were led to believe the Pi stood for user freedom since it had been stated the purpose of the Pi was to get away from closed restrictive platforms. This step is clearly not any freedom of choice for users. Any other technical details are irrelevant.

So this is disappointing, with all the time, money and praise given only to have this happen.

Reply to ron

Avatar

Hopefully over time it will be possible to install PyCharm, IntelliJ IDEA and other JetBrains products.

Reply to nafanz

Avatar

I installed Raspberry Pi Desktop (from https://www.raspberrypi.org/software/raspberry-pi-desktop/) into a Hyper-V VM.
I made all updates I read about: update during installation, apt full-upgrade, apt update.
But the installation of VS code (apt install code -y) always ends with:
“E: Package ‘code:amd64’ has not installation candidate”
Thanks for help in advance :)

Reply to LinuxRookie

Avatar

I guess maybe having a really nice obvious GUI option to give the end-user complete control and visibility to what repos are trusted and available on their system might be something to think about for future Pi OS versions. (Perhaps as part of the setup process)

Reply to minijohnny

Avatar

so why is it that when i follow your instructions i get “unable to locate package code” ??

Reply to Robin Smith

Avatar

Ohh thank god I came across this. Now I can finally use my favourite text editor on my raspberry. In my opinion, it’s the most productive code editor that i’ve ever used. Cheers to the addition.

Reply to Travis Ernest

Leave a Comment