Hacker News new | past | comments | ask | show | jobs | submit login
Visual Studio Code Comes to Raspberry Pi (raspberrypi.org)
80 points by mariuz on Feb 12, 2021 | hide | past | favorite | 69 comments



For what it is worth, I've also found that using VSCode for remote development to a RPi 3 and now RPi 4 to be really nice.

I have VSCode installed on a chromebook, and VS Code remotes into the RPi and everything just works really nicely for remote development using a local VS Code instance.

Say what you will about there being a MS repo in the raspberry pi OS (which I think is a huge overreaction - it is an OS designed for children & beginners to use, so if you are a power user who is bothered by this then simply try using something else or just disable it - end of story), VS Code has become so powerful and such a pleasure to use that I wonder how we managed to survive as long as we did banging stones together back in sublime text et al.

While I don't even use the same browser on different machines any more (mixture of chrome, firefox and edge across Linux, Win10, and ChromeOS), I only use VS Code on every machine. Its really great.

Good work RPi for making this happen.


I'm incredibly impressed with just how good VS Code Remotes are. I use it with WSL, to go Windows -> local Mac and Windows -> remote Linux server and it just works so well.


Same - all my work is remote these days, and I’m considering dropping my JetBrains subscription because of it. I love the jetbrains tools so much, as they’re better at basically everything; except for this one feature of remoting where VS code is miles ahead, and it turns out that that's more important than everything else combined...


I was of the impression Jetbrains are preparing some remote coding feature but now I found only Code with Me and an unresolved feature request at https://youtrack.jetbrains.com/issue/IDEA-226455 so I guess I misremembered (but maybe the Code with Me will evolve).


Is this for JS development? Or a compiled language. Id like to use remote but not sure how easy it is so this is encouraging.


I've used VSCode remote development for JS, TS, C++ (with clang), and Golang.

It all just works. VSCode even has a built in debugger that just works - I can use the visual debugger in VSCode running on a chromebook to debug JS or C++ running on the remote machine. It all works over some SSH magic that is abstracted away. Breakpoints, call stacks, local variables, step in/out/over etc - all there on your local machine despite the code running on another machine somewhere else.

Even if I am working with docker/docker-compose on the remote, the local VSCode has built-in support for listing running containers, showing images, attaching shells to containers, up/downing compose configs etc etc. Super useful for me since I can never remember the command line for attaching a shell :)

I have been really impressed. It is kinda getting to sort of "universal IDE" sort of levels of functionality but it still feels like a lightweight text editor at its heart (extensions help a lot with this I guess - only have what you need). Only negative is load-times are slightly longer than I'd like at perhaps 3 or 4 seconds on my machines.


It's like your local VSCode was running on the remote box from a functionality perspective but the local box from a UI perspective. It's pretty straightforward to get going https://code.visualstudio.com/docs/remote/remote-overview


Remote with Java works great via SSH for me. With attached debugger to app servers, code completion, and all that. I have literally 0 problems with remote development.

It's unbelievable how good VSCode is.


Remote VS Code via SSH works absolutely fantastically everywhere with the one exception being the Pi Zero which is a shame.


It's a good thing they waited until there was a Raspberry Pi available with four cores and 8GB of RAM.


VSCode is by far the lightest Electron app I've ever used. I currently have a decent sized repo open, with a good number of plugins, and it's using 0% CPU and 12MB ram on Windows (and I haven't restarted the app in probably 2 days).

Teams on the other hand... that's a hog.


The Panzer IV is by far the most agile and nimble medium tank I've ever used.


Does it not depend a lot on what plugins and the size of the files? I'm sitting here in a small Python repo and I am at 260MB with no files open.


Sure, plugins can be very powerful and can therefore eat up any amount of resources. If you've got a language server that's doing the work of a full-on IDE behind the scenes, resource usage will go up accordingly.

But the GP wasn't talking about plugins. They were invoking the tired trope that Electron App Go Brrr, which isn't especially true in the general case, and is emphatically not true in VSCode's case.


Raspberry Pi can be frustrating that way. Their product lines vary so wildly in performance that it can be confusing and misleading for new or inexperienced users.

Often I’ll see people praise the Pi for being “a $5 computer”, then go on to discuss their projects which would definitely not work on the Pi Zero.


On one hand, anything to make learning to program easier is a good thing.

On the other, every time I hear about Microsoft getting deeper into the open source community, it feels like a friend is telling me she's getting back with an abusive ex because he's changed. I know its a very large company with many faces each with their own pros and cons. I also know vscode is quite good, and if they pulled some classic Microsoft trickery it would be forked.

At this point It's just a gut reaction to all things Microsoft, I don't even remember why I don't like them anymore. Still, more and better software is a good thing. More people learning is a good thing. I don't know, I just think some of the overly negative comments are being bashed more than they deserve, because they were being emotional and not acknowledging it.


I think MS are being smart. Go after the developers, design the IDEs, the repo software, the languages, and then get them developing for Azure.


The optimistic interpretation is that they just want to repair their image in the minds of developers, so that more developers feel open to using Azure (Developers! Developers! Developers!)

But I agree there's something unnerving about how deep their grasp has been getting lately


VSCode is forked, into Vscode-oss and vscodium. These forks are small-minor changes, just building without microsoft's telemetry, so nothing that substantial.


While there are only minor changes between VSCode and the open source builds, increasingly the ecosystem around VSCode is becoming proprietary. For example, the Remote Development extension is proprietary[1].

[1] https://code.visualstudio.com/docs/remote/faq#_why-arent-the...



Excuse my ignorance, but wasn't VSCode already available on ARM? Is the difference being to use APT for installation?

That said, the accessibility of inexpensive tools like this to get started writing your own software is phenomenal! It's a bit encouraging in the wave of users migrating away from production to consumption devices.


There's a difference between it being "available" and including it as a default repository in sources.list.d. Available means it's a choice. Not everyone wants MS software on their computers. I don't. This means that your systems checks in with MS every time an update is run. If others follow suit out of a "Me, too!" obligation, I may lean to NetBSD or OpenBSD on my Pis. I severely dislike MS's telemetry and how they have their hooks in everything. My software should never phone home unless I want it to do so.


It was available "unofficially" from here:

https://github.com/headmelted/codebuilds


Looking here: https://packages.microsoft.com/repos/code/pool/main/c/code/ it seems, it has been available natively for some time already.


Too bad C# debugging is not yet supported on ARM64: https://github.com/OmniSharp/omnisharp-vscode/issues/2771


Although open-source, most people use VSCode with some proprietary plugins. This is definitely not good, especially considering microsoft long history of abuse of monopolies through all its history and even recently: https://betanews.com/2021/02/08/linux-based-raspberry-pi-os-....

We need IDEs that are not controlled by companies.


Agreed. I use vi and nano (light scripting) and nothing else. There are so many cool things that vi can do, but most here know this. I don't want my hand held when I'm writing lines of code. I cut my teeth under an old grey beard sysadmin/programmer over 2 decades ago, so I appreciate learning the hard way. This method is not for everyone, and I can appreciate some people liking Git being built in or autocomplete, etc., but it's not for me. I do like syntax highlighting and line numbers, but not much else. I like being a little slower, more deliberate, and debugging my own code. Honestly, even when I'm coding, I'm rarely writing more than 20-30 lines of code a day anyway. There are so many other things I need to focus on like documentation, etc., that having an editor that holds my hand actually slows me down.


You don't even really need an IDE.


As someone who tends to write Elixir (which, indeed, doesn’t really require an IDE), but has to sometimes help with coworkers’ Java code (where I just stubbornly continue to use my text editor, because it’s what I know): I’m probably being ridiculous, and wasting a lot of time that learning an IDE would pay back nearly immediately†. I see how much more quickly my coworkers can hack on the Java codebase than I can; it’s ridiculous.

If I was my own employee, and working on Java projects all day, and continued to stubbornly use a non-IDE, I’d fire me, because that level of deliberate time-wasting is basically malfeasance.

† Especially for calculating imports, and constructing type declarations. (Y’know, the stuff that more succinct static languages use compile-time inference to achieve.)


It is particularly difficult to be productive in modern java without an advanced, jetbrains-like, IDE. That is almost a language "feature".


I think the language permits the IDE rather than the other way around.


I don't know about nano but Vim has many autocomplete plugins


How is it with lldb or gdb? I’m looking for a cheap Linux dev box because my macOS lldb doesn’t step properly and can’t be upgraded without the latest OS.


Yeah, I hate how the Foundation has handled the VSCode thing. Slipping in a Microsoft repo with a post install script, making it difficult for Raspberry Pi OS users to opt out, and silencing people's complaints on the forums. Everything to make them look like jerks short of declaring the backlash an alt-right conspiracy. Why not just... put VSCode in their own repo, where all the other proprietary gubbins like Mathematica live?


Teaching kids about sources.list and how to remove MS backdoors, one Pi at a time.



What are some good tutorials and projects for 9 year old using raspberry pi.



Well, time to sell my raspberry pi, another one who betray their users..

What alternative can you guys recommend?


That explains the unfortunate fact that the raspberry pi foundation silently added a Microsoft repository to their main OS silently a while ago.

It makes sense for the educational target of the desktop version, but it would have been nice to keep it packaged inside their own repositories, giving Microsoft the ability to insert themselves into the packaging chain of a Linux distro used by millions is not something I am very fond of.


The Raspberry Pi is meant to be educational for a people with a range of skills, and they did say in their issue tracker that by adding the repo, it means everyone has easy access to it. I expect they'll be able to add further intro articles and blog posts and make a Pi even more accessible.

I suspect it's easier for tech savvy people to remove it, if they really care, and rather more difficult for relatively non technical people to figure out how to add the MS repo, then install VSCode.

I'm in the former group. It's easier for me to remove it, than it is for my nephew to add it.


To remove it, you have to be aware that it exists first, which is certainly not the case of a large majority of tech-savy people who do not necessarily read all the news regarding their system.

I certainly wouldn’t expect my distro to silently add a repo to my already installed system.

My point was that they could have added VSCode to their own repositories with minimal maintenance effort, which still provided the software without the need of another repo.


If your nephew is using VSCode, I think adding a repo shouldn't be very hard? Or perhaps that's the more insidious underbelly being exposed.

It's like when schools teach a specific tool, instead of generic tools. The students only know that one thing.


hmm, that is indeed rather worrying

I guess it's time to drop raspbian (or whatever it's called this week) and switch to plain Debian across my pi estate


Debian is fantastic on the Pi. Same goes for Arch.

There's also 'Armbian', which is recommended for some non-RPi boards.


The shady hacks they had to do to retroactively install it on existing distros all looks so terribly bad. Who signed off on this being a decent idea given their customer base?


Just to be clear, if Microsoft publishes a package with a version number higher than that in the Raspberry Pi OS default repos, does it mean it will get installed? Or is the repository configured in a way that it is only used for VS Code packages?


May I ask: what exactly is the reason to treat Microsoft as a bad actor here?

To my knowledge, they have zero history of taking over packages they do not control, nor any history of messing with repo contents in a misleading fashion.


This is great. It's understandable that Raspberry don't want users to have to fiddle around with apt sources just to install VSCode. Installing stuff on Linux is difficult enough as it is (remember this is supposed to be for beginners, not that it should be hard for pros either).


If `apt install code` is hard, then using it will be impossible.


Small difference: VS Code isn't on official apt repos, so they added the Microsoft repo by default on their learning-based linux distribution that is supposed to help children learn with ease.


Nonsense. You can write and execute Python code in VSCode without even leaving the GUI.


Good luck writing Python code if you can't write `apt install code`.


I think if it wasn't installed by default, new users would be better served going through the Raspberry Pi OS "Recommended Software" program that can be found in the main menu. Your command won't help them.

  $ apt install code
  E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
  E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?


Which is unwelcome because Raspberry Pi included a repo for a Microsoft product without informing users prior. It pings MS every time an update occurs. It's one thing for it to be available, but another entirely for RPi to assume users want anything to do with MS. If I wanted to program using VSC, I would download it based on my need for it. I have no need for it since I don't live in a MS world.

https://www.pcmag.com/news/users-upset-as-raspberry-pi-os-no...

https://betanews.com/2021/02/08/linux-based-raspberry-pi-os-...

To disable it using the terminal:

cd /etc/apt/sources.list.d

ls to look for "vscode.list"

Enter sudo nano vscode.list

Comment out last line with the MS URL

I don't want to disable it, I want it to go away and never return, but sadly, RPi think they know better than their users and it will show up again if deleted. I may look for another Pi distro because this is beyond the pale. Addind repos is a personal thing beyond the basic repos needed to run to OS and default software/updates. I'm also not a fan of MS owning GitHub.


I really don't understand how this is an issue. The raspbian distro is designed and fundamentally revolves around being a learning environment with as little friction/barrier to entry as possible. So having the repo available makes sense. If there is a need to be in complete control of every aspect of what is installed in the distro then there is always the option of creating your own distro that is completely controlled using something like the Yocto Project.


I use the software I do for many reasons. One of these reasons is that I dislike Microsoft and their business practices. I don't want to deal with them on any level, and for RPi to assume this low barrier to entry is welcome assumes many things they shouldn't assume. MS bought GitHub, which is bad enough. Their telemetry is reason enough to avoid them. America needs a version of the GDPR stat.


I fricken love Microsoft and their products that have pushed the whole business of computing to an unpresedented level. And with their recent (as in the last years) focus on contributing, valuing, and pushing open source they have my full respect for being able to see that this is the way of the future.

Perspectives, I guess.


They would also have pushed vendor lock-in to an unprecedented level, if they were allowed to.


The Rpi Foundation already worked together with Microsoft on Windows IoT Core, and Tte Raspbian distribution includes many different packages from many different authors, some commercial, even though some of them may not be used by everyone.

So I think it's fairly clear they do not share your extreme views on Microsoft, and on not installing any software that is not needed by every user. You picked the wrong distro.


You're mad because your Raspberry Pi offers you the possibility to install a piece of software you have no interest in? Microsoft can't track you if you just simply... don't install vscode. It's that simple.


> Microsoft can't track you if you just simply... don't install vscode.

Not really true. As the GP wrote:

> It pings MS every time an update occurs

is exactly true. You will ping Microsoft every single time you run 'apt update', even if you have nothing installed from this repo.

Ideally, the repo should be disabled by default.


The same goes for every repo by that definition. The only solution is to download tarballs and compile everything yourself.


The difference is that you usually add the specific repos only when you need them. This one is configured and enabled out of the box, by default, for everyone.

I wonder... why so many people on this topic miss the nuances and suggest going into extremes?


ah yes every repo is tracking you. -_-


well, because enabling a repo only when you need it is sooo difficult -_-


I have been using linux(slackware) since the late 90's. You are the first person I have ever seen even suggest that as an idea.


Really? Slackware came with proprietary repos enabled by default? (I don't remember; I had slackware on floppies).

Even Ubuntu didn't do that; their partners repo is off by default, if you want it, you can enable it. Fedora has similar mechanism, where it asks you when you first time run the Gnome Software.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: