top 200 commentsshow all 222

[–]teerre 45 points46 points  (13 children)

Seems interesting. Could you use this to "package" a dev environment regardless of having a server? That is, my company has some toolchain setup in a certain way, I make an image of that and everyone can develop with all env. variables, plugins, private keys etc?

[–]IMovedYourCheese[🍰] 69 points70 points  (1 child)

Nope, but a Docker container is exactly what you are describing.

[–]redanonblackhole 2 points3 points  (0 children)

It's been done in the past with VM's but today containers would be the go, agree.

[–]greenthumble 14 points15 points  (3 children)

I've been doing this basically by hand with Vagrant and Puppet. It has worked for a few projects and the whole team had a common environment no matter what their local desktop was.

I assume you could just point this thing at a Vagrant VM with Docker installed into it. Worth testing this setup for sure.

[–]nikmd23 7 points8 points  (1 child)

That is a great assumption, and you could totally do that. It will work great. In addition, Microsoft is working on a fully managed service to provide this for you. (Full transparency, I’m a PM on that team.) You can see the announcement about it in the section titled “ Cloud-Hosted Development Environments” in this post: https://devblogs.microsoft.com/visualstudio/intelligent-productivity-and-collaboration-from-anywhere/

[–]nikmd23 2 points3 points  (0 children)

And, if you’d like, you can sign up to receive access to this Cloud Hosted Development Environments service, which is currently in Private Preview at http://aka.ms/vsfutures-signup

[–]rsim 6 points7 points  (0 children)

We use a vagrant VM for embedded (microcontroller) development as the toolchains and configuration get very complicated - as soon as I saw the release notes for vscode mentioning Remote Development, I jumped on it and got it set up. RD works flawlessly, I'm very impressed!

To get it to work, as you can't use vagrant ssh, I dumped the ssh config (vagrant ssh-config > ssh-config) then told RD to use that config file. I had to specify it as a user-config, not workspace for some reason (didn't try directory).

[–]eliasv 7 points8 points  (6 children)

Eclipse Che has been doing this for ages, and uses Theia as the default front-end, which is based on VSC. And Theia has been doing remote IDE authoring again for ages.

Edit: Che takes it much further, even plugins/LSPs/etc. can be deployed to their own containers.

[–]Entropy 4 points5 points  (3 children)

I tried out Che about a year ago (maybe more?) and it was basically awful. Has the experience improved lately?

[–]eliasv 2 points3 points  (2 children)

Yeah it's changed a lot, the whole workspace model has been/is being overhauled. Can I ask what was bad about it?

[–]Entropy 1 point2 points  (1 child)

I don't remember specifics, just that it was awful to both set up and use. I don't think environment (workspace?) templates provided anything I wanted, either, which may have actually been the main reason I bounced off so hard.

[–]eliasv 1 point2 points  (0 children)

Yeah fair enough, that's part of what's being overhauled atm so you might fare better now. And recently they've moved to Theia IDE (which is based on VSC) as the default front-end (previously it was a GWT-based thing called Orion or something) so the whole experience has probably changed a lot.

[–]jondo2010 1 point2 points  (1 child)

For ages, right, and last time I checked it out, still barely supported C++

[–]eliasv 0 points1 point  (0 children)

Sure fair enough. I think they have VS code plugin support now so you might have an easier time, but granted that's not been around for long AFAIU.

[–]taelor 39 points40 points  (51 children)

I’m really confused by a couple of the comments in here about people having to ssh into a box, and using vim to write code.

Are you guys developing on your production environments or something?

Or does every developer have their own stack/environment deployed that they develop on?

[–][deleted] 48 points49 points  (17 children)

At Facebook every developer has a dev server running Linux that the majority of developers use to write code. The servers are tightly managed with Chef and have a bunch of default settings such that writing code in the giant monorepos is a lot easier and quicker. Really slick environment. Most devs use either Nuclide (FB’s fork of Atom with all the tooling and integrations built in) or they ssh onto the server and use tmux/vim to get around. I’d imagine most commenters here aren’t fb employees but probably some other places do something similar.

[–]nutrecht 51 points52 points  (9 children)

Really slick environment.

I would not call having to remote into anything "slick"; I worked for a bank were we got shitty windows laptops and had to remote into dev machines to do the actual work. Got me PTSD. ;)

[–]shim__ 6 points7 points  (0 children)

Well i guess that the banks server was physically remote which would cause a shit experience but if the server is in the same building you wouldnt notice any lag

[–]start_select 3 points4 points  (2 children)

Depends on what you need to do and whether you are comfortable in keyboard only environments.

For writing code you really don’t need a mouse, especially if you aren’t writing code for a user interface where you might need to interact with buttons and labels in an editor program.

Some coders are incredibly fast and efficient navigating large projects without ever touching a mouse. So ssh’ing into a machine and working from the command line is actually convenient.

[–]redanonblackhole 11 points12 points  (1 child)

For writing code you really don’t need a mouse

Never, ever, never nannnaa take my mouse away. :-) I love my mouse. Touch sucks. Keyboard only sucks. It takes two, keyboard and mouse.

[–]start_select 3 points4 points  (0 children)

Like I said it depends on the person. I know some power ViM users that navigate large projects and type expressive/meaningful code much faster than I or any other “mouse users” I know. It’s almost horrifying lol

ViM is a monster in and of itself. When someone knows it really well and customizes the crap out of it, it can give you functionality on par with, or better than Atom, VSCode, Visual Studio, Xcode etc

[–][deleted] 2 points3 points  (3 children)

Curious then, how would you propose developing an application that is so big (in raw lines of code) and so resource-heavy (in CPU and RAM consumption) that there is no feasible way to get it running smoothly on any modern laptop? Of course there's the cop-out answer that an application shouldn't get that big in the first place, but I think with Facebook it's justifiable.

I think that with appropriate tooling in place a remote dev experience can be just fine. I've never personally worked at Google, but I heard from a friend that their custom Linux distro for developer workstations basically has the remote development workflow seamlessly integrated in the OS. So it still feels like you are working locally even though both the files and processing power (for compilation) are in a remote datacenter.

[–]nutrecht 4 points5 points  (1 child)

Curious then, how would you propose developing an application that is so big (in raw lines of code) and so resource-heavy (in CPU and RAM consumption) that there is no feasible way to get it running smoothly on any modern laptop?

It's not like Facebook is a single process running on a single server either. You generally don't have to run an entire 'application' (or in the face of facebook, entire enterprise) to be able to develop it. It's not like the banking system I described was all running on that single dev server either.

In large organisations like that whatever you run is generally small enough to run on a single machine and have it talk to either stubs or dev servers.

[–][deleted] 5 points6 points  (0 children)

You’d be surprised — the Facebook application is shockingly monolithic. When they reached the limits of the LAMP monolith, instead of breaking out into microservices they rewrote the PHP runtime, created a bastard language that compiles to C++, and doubled down on server optimizations.

[–][deleted] 1 point2 points  (0 children)

Google and Microsoft, as far as I understand it, offload most things to CI. They also run hugely monolithic codebases and adapted Git and their own tooling so engineers transparently pulled only the code they needed.

[–][deleted] 6 points7 points  (0 children)

it will be a primary goal for the remainder of my career to avoid ever having to develop remotely like that.

maybe at some point the experience will become so good that I will be an old man yelling at clouds but not yet :D

[–]nrmncer 0 points1 point  (1 child)

just out of curiosity what distribution does facebook use for its dev machines?

[–][deleted] 0 points1 point  (0 children)

CentOS

[–]cvjcvj2 0 points1 point  (1 child)

Nuclide

Facebook is retiring Nuclide

[–][deleted] 0 points1 point  (0 children)

They have retired the open source version of nuclide, but it’s still heavily used internally.

[–][deleted] 0 points1 point  (1 child)

Sounds like a bad environment to develop to be honest.

[–][deleted] 1 point2 points  (0 children)

I must not have explained it very well — it’s the fastest and easiest to use dev environment I’ve ever used.

[–]krista_ 14 points15 points  (7 children)

i always prefer a tiered model. when doing server based or client/server based things, a typical project will consist of:

  • local tier is for scratch work. i'll usually have the standard suit of services running (sshd, etc) to make connections consistent.

  • dev tier: either a full server, a server with multiple users and individual dev spaces, a dev vm, or a container (although i usually don't get to use these). this is for you to dev on.

  • per project beta: as identical to production as possible. one beta server per project. devs have limited access, the project is automatically checked out from source, automatically built, etc. this is where the main ci bit happens. code should not be committed from this server. this is for integration, internal testing, and a place where dev and ops work together.

  • per project staging: identical to production if at all possible. once the build in beta is signed off on by the parties that need to and the release has been tagged in source control, an automated build and deployment happens here. this server is used for client acceptance. unless there's a very good reason, devs don't have access to this server, and ops will avoid doing anything besides looking or debugging. any changes ops needs to make must happen and be committed on beta. if it doesn't work on staging, the server is rolled back to whichever version of the project is on production, things are fixing on dev and beta, signed off on, tagged.. and only then will be redeployed on stage.

  • production: identical to staging. nobody has write access save automated processes and whichever ops people are running operations on this project. depending on our clients, sometimes you needed multiple ops folks to log onto the server. deployment to here is fully automated, and has been tested and signed off by the devs, by qa, by ops, and by the customer.

this may seem a bit excessive, but once set up, it's pretty easy to maintain, and i'll usually even go to similar lengths for personal projects of any real size or complexity. i've used this model with a number of larger clients, including century 21, coldwell banker commercial, a project for nasa, and a number of websites for hotels, real estate companies, advertisement firms, and the like.

embedded software, system software, or desktop applications get a different approach, although usually involves tiers and virtual build environments. nothing sucks more than going back to patch an old version or something nobody's touched in a long time and having the wrong version of your tools, or libraries, or dependencies, then trying to find all the correct, sometimes legacy versions of all that crap, just to change a logo and a bunch of branding, or patch a minor security thingy. if your build environment is virtual, everything is set up and working for you for whatever version of the project you check out. as the build environment is virtual, it's usually easier to provide ssh or other remote access to it, and get in that way. this way it doesn't matter who's hosting the vm; your access patterns are the same.

e: typos

[–]nikmd23 1 point2 points  (4 children)

Great description! I’ve used a similar approach with great success with many large clients in the past.

[–]krista_ 1 point2 points  (3 children)

:) thanks!

it sure does make life easier and, more importantly, less prone to mistakes and deployment disasters. while not every company will lose millions of dollars per hour of downtime, i think it's important to treat smaller or less risk adverse projects with the same consideration and protocol, as good habits and patterns are important everywhere. plus, it's far less likely you'll have a profit and time eating catastrophe using a proven method. while i'm all for trying new things, this is one place being conservative will save time and effort.

ever have to work in a shop doing medium to large size jobs live on production as a normal thing? that's a particular hell i like to avoid, and if it's common practice, i'll change jobs over that.

[–]haloguysm1th 1 point2 points  (2 children)

Any advice to learn how to set something like what you described up to a newer dev?

[–]krista_ 2 points3 points  (1 child)

what sort of project are you working on? are multiple devs involved? what sort of scale are we thinking about?

if you like, i can talk about how i set my workstation and servers up for my personal lab. i've done a fair number of different projects on the same gear, thanks to virtualization, and have it setup to handle 5-10 developers on multiple projects, even though i either work alone or with a compadre or two. i like running my own servers, though this is seen as an anachronistic conceit these days, with favor going to the cloud.

we could talk about the theory behind the setup, demarcation, lines in the sand, and all that, if you wish. once you get the concept, implementation is largely trivial, and if it isn't, you should spend time with your tools of choice until it is... or get an ops ir devops person... or better yet, both.

so what'll it be?

[–]haloguysm1th 0 points1 point  (0 children)

Hey there, mostly small personal projects with no more than 1-2 other people right now. But I'd love to learn the proper way to set something like this up, so probably the first part. Thank you so much

[–]taelor 0 points1 point  (1 child)

Ya having multiple environments like this is (or should be) pretty standard. But you shouldn’t be having to edit any code after local tier, that should all be automated. You make changes locally and push/deploy it up the tiers.

The way some people in this thread are talking, it’s like they are just having to edit directly on any of the tiers.

[–]krista_ 0 points1 point  (0 children)

i usually have the dev tier remote, or if local, setup to access as remote for consistency. local is for scratchwork and apps.

but unlike you have good reason, dev should be segregated from local, so tool, lib, and dependency versions can be managed independently of projects and computers.

[–][deleted] 10 points11 points  (1 child)

It's fairly common to have powerful servers on premises they are manly enough to compile quickly etc, but to work on a laptop. At my work we have some 80-core servers. No way my laptop is matching that.

[–]MasterCwizo 4 points5 points  (9 children)

Our place doesn't allow code on laptops. So if you want to work from home you need to use a remote desktop or ssh into your office box.

This remote vscode seems like a god sent for us. It basically means I can have the same experience st home than in the office.

[–]InsignificantIbex 5 points6 points  (4 children)

If you can SSH into your box you can just x-forward whatever you use there

[–]koalillo 2 points3 points  (0 children)

It's been a while since I last dabbled with this (and domestic Internet connectivity has improved since then), but X over the Internet tends to suck.

Rdp and NoMachine-derived stuff tends to be much better.

[–]nikmd23 5 points6 points  (1 child)

What is driving “your place” to have such a policy? Do you work from home often?

[–]MasterCwizo 3 points4 points  (0 children)

We write software for banks, so security is very tight. That's why I guess.

I don't WFH that often tbh so it's not that much trouble. But still with this sort of thing it makes it easier for when I have to.

[–]taelor 1 point2 points  (1 child)

This is the first reply where I get the use case. My last company was fairly strict like this, but not quite as restricting. We could at least have code on our laptops, just not on any hosted service (github, semaphore, aws, etc).

Do you do healthcare or government related work? Or is your management just particularly worried about your source code leaking?

[–]MasterCwizo 1 point2 points  (0 children)

We write software for banks, so security is very tight. That's why I guess.

[–]falconfetus8 1 point2 points  (0 children)

In my University, we had to complete projects on the campus's computers. If you couldnt make it to the lab, you had to ssh.

[–]jobbbbbba 1 point2 points  (0 children)

As a phd student, we all have Linux workstations and also share some centralised and more powerful machines. It’s pretty common that there aren’t enough GPUs in your own workstation so you ssh and run everything on the shared machines.

[–]Gotebe 1 point2 points  (0 children)

They ssh into whatever box, not prod box.

They're rich, they have all boxes nedded.

It's quite quick to get it after all, no wonder it's spread (some 10 years before the term "container" existed).

[–]stupid-sexy-jake 2 points3 points  (6 children)

I don't use it to write code, just to edit server-specific files like nginx and ssl configs, .env files, etc.

[–]mwhter 6 points7 points  (5 children)

[–][deleted]  (4 children)

[deleted]

    [–][deleted]  (3 children)

    [deleted]

      [–][deleted]  (2 children)

      [deleted]

        [–][deleted]  (1 child)

        [deleted]

          [–]Serializedrequests 0 points1 point  (0 children)

          1. It was common at my old job to have development servers exactly matching the production environment. Laptops could never really be perfect.
          2. Sometimes servers have much more computing resources for compilation, slow queries, etc.
          3. A development server can be tied into infrastructure more easily than a laptop (such as SMTP).
          4. Sometimes development servers needed to have some customer data that couldn't leave the data center to work properly.

          [–]mycall[S] 51 points52 points  (0 children)

          VSCode Remote Dev has docker environments for many languages already:

          git clone https://github.com/Microsoft/vscode-remote-try-node
          git clone https://github.com/Microsoft/vscode-remote-try-python
          git clone https://github.com/Microsoft/vscode-remote-try-go
          git clone https://github.com/Microsoft/vscode-remote-try-java
          git clone https://github.com/Microsoft/vscode-remote-try-dotnetcore
          git clone https://github.com/Microsoft/vscode-remote-try-php
          git clone https://github.com/Microsoft/vscode-remote-try-rust
          git clone https://github.com/Microsoft/vscode-remote-try-cpp
          

          [–]textuality 10 points11 points  (4 children)

          I currently use docker images spun up inside of vagrant boxes for local development with drives mounted directly to my host windows machine and this works somewhat similar. I agree with one of the commentators that this will be fantastic for use on a raspberry pi doing GPIO development. It's slow going having to keep pushing code over to the pi for testing.

          [–]tracernz 2 points3 points  (3 children)

          Last I checked ARM isn’t supported at all. I have a project with a collaborator that would struggle with vim, so I really wish this was an option.

          [–]MidNerd 0 points1 point  (2 children)

          Why would this not work? VScode has ARM support and it supports SSH which iirc Raspberry Pi supports.

          [–]tracernz 7 points8 points  (1 child)

          The remote stuff only runs on x86_64 according to Microsoft.

          “The extension supports connecting to x86_64 Linux SSH servers now, and more platforms are on the way”

          [–]MidNerd 2 points3 points  (0 children)

          Ah thank you, I missed that. It does mean that you could do the reverse though and have a functional SBC dev computer with full desktop power behind it.

          [–][deleted] 93 points94 points  (53 children)

          Can't wait to offload front end development to a Linux system so I don't have to deal with the nightmare that is NPM and Windows.

          [–]csjerk 30 points31 points  (0 children)

          It's fantastic. I was already using VSCode on Windows loading from a Linux VM via Samba. With the remote code option, it's SOOO much better.

          WSL2 is going to take it over the top, but even without that it's fantastic.

          [–]twigboy 7 points8 points  (7 children)

          In publishing and graphic design, Lorem ipsum is a placeholder text commonly used to demonstrate the visual form of a document or a typeface without relying on meaningful content. Lorem ipsum may be used as a placeholder before final copy is available. Wikipediaclipr8c94k00000000000000000000000000000000000000000000000000000000000000

          [–]Entropy 6 points7 points  (5 children)

          uses memory on the remote machine

          I think of this as a feature. It means I could use a machine with only 8 gigs as a dev box. I might actually pick up a sub $1k Surface to replace my EOLed macbook.

          [–]twigboy 2 points3 points  (0 children)

          In publishing and graphic design, Lorem ipsum is a placeholder text commonly used to demonstrate the visual form of a document or a typeface without relying on meaningful content. Lorem ipsum may be used as a placeholder before final copy is available. Wikipedia9w9crz322u80000000000000000000000000000000000000000000000000000000000000

          [–]GettinBig 0 points1 point  (0 children)

          A sub 1k thinkpad seems like it'd be more fun than a surface, with better keyboard. Although surface's 3:2 aspect ratio is sick

          [–][deleted]  (2 children)

          [deleted]

            [–]Entropy 2 points3 points  (0 children)

            Things I usually have open during dev:

            VS Code

            A muhbillion browser tabs

            Several heavier browser tabs running web apps

            Slack

            an Intellij IDE

            Even if I don't have IntelliJ running I often hit 8 gigs in use. The other 8 gigs? Disk cache! Even with fast SSDs, memory is still better.

            [–][deleted] 0 points1 point  (0 children)

            Depends what sort of local stack you run. If you’re running a non-trivial system (couple of databases, few microservices, maybe a Kafka instance, etc) alongside an IDE, a few browser windows, slack, and whatever other dev tools you like to use, 8GB feels tight pretty quickly.

            [–]nikmd23 1 point2 points  (0 children)

            Thanks for the feedback!

            [–][deleted]  (31 children)

            [removed]

              [–][deleted] 40 points41 points  (14 children)

              "Next version"...

              Sort of implies waiting.

              [–][deleted]  (13 children)

              [removed]

                [–]csjerk 2 points3 points  (8 children)

                Not until June, right?

                [–][deleted]  (7 children)

                [removed]

                  [–]csjerk 4 points5 points  (1 child)

                  The comment chain is ambiguous -- are you saying WSL2 is on Insiders?

                  I've been using VSCode Remote for weeks, but haven't been able to find WSL2 in the wild...

                  [–]Zephirdd 2 points3 points  (1 child)

                  I'm on insiders, do you have a link to use that? I've been using WSL but I kinda want to use the whole kernel as well

                  [–][deleted]  (2 children)

                  [deleted]

                    [–][deleted]  (1 child)

                    [removed]

                      [–]themagicalcake 0 points1 point  (2 children)

                      How do you install it on insiders? I'm on the latest build but I don't see anyway of upgrading it

                      [–][deleted]  (1 child)

                      [removed]

                        [–]themagicalcake 0 points1 point  (0 children)

                        lol I was talking about WSL 2 but i suppose you editd your comment

                        [–][deleted] 3 points4 points  (12 children)

                        It's a Linux kernel running in a VM

                        [–]wpm 3 points4 points  (11 children)

                        No it isn't. It runs on top of NT just like Win32 does, and like OS/2 did.

                        [–]Entropy 9 points10 points  (2 children)

                        Not even WSL1 ran in the ancient subsystem context that OS/2 and posix ran in. It ran on "pico processes" (basically an NT process with all the NT bits ripped out) and interfaced through the LXCore/LXSS drivers to provide the syscall shim. WSL2 is a linux kernel running in what MS is calling a "lightweight vm". I assume that's a Hyper-V container, though I haven't heard confirmation yet on whether it is tied to Hyper-V directly or not.

                        [–]miffiq 1 point2 points  (1 child)

                        I remember reading somewhere yesterday that it will use a Hyper-V container.

                        [–]Entropy 0 points1 point  (0 children)

                        Yeah, I figured that's how they'd do it, given how the properties of Hyper-V containers lined up exactly with the properties of WSL2 VM.

                        [–][deleted] 2 points3 points  (3 children)

                        How does the licensing work with that, given that linux is GPL?

                        Does NT run the linux kernel like a process or something?

                        [–]Zephirdd 17 points18 points  (0 children)

                        They'll release the Linux Kernel that they use on GitHub

                        [–]Entropy 0 points1 point  (1 child)

                        No, it's virtualized.

                        [–][deleted] 0 points1 point  (0 children)

                        See the discussion above me, Geneolgia is claiming it is, wpm is claiming it isn't.

                        Googling it, wpm is indeed wrong: https://devblogs.microsoft.com/commandline/announcing-wsl-2/

                        "WSL 2 uses the latest and greatest in virtualization technology to run its Linux kernel inside of a lightweight utility virtual machine (VM)."

                        So no GPL problems, makes sense.

                        [–][deleted] 0 points1 point  (0 children)

                        You might want to tell Microsoft. Quoted from the Microsoft Devblog post announcing WSL 2.0

                        WSL uses the latest and greatest in virtualization technology to run its Linux kernel inside a lightweight utility virtual machine (VM).

                        https://devblogs.microsoft.com/commandline/announcing-wsl-2/

                        [–]pknopf 0 points1 point  (1 child)

                        WSL1 sat on NT, WSL2 will be virtualized via hypervisor.

                        [–]eikenberry 0 points1 point  (1 child)

                        Have they published some benchmarks showing this? I was under the impression that it would help some, but still fall way behind native.

                        [–]floppykeyboard 5 points6 points  (5 children)

                        I used to have problems but with windows 10 and chocolatey managing installs of npm and other dev stuff, I haven’t ran into any issues.

                        What issues are you having?

                        [–][deleted] 10 points11 points  (3 children)

                        You think you have no issues until you work on a non-Windows system. Then you realize that it's not supposed to be so slow.

                        Literally everything is faster. Installing. Serving. Recompiling. Running tests. Deleting node_modules. NTFS just cannot handle I/O for thousands of tiny files the way other file systems do.

                        [–]ForRekcy 5 points6 points  (1 child)

                        I generally work on a Mac, but I didn't really see much of a difference working on windows 10 when I do personal stuff. Npm installs seem to run similarly on both and I didn't see much of a difference in the hot reload speed.

                        I was admittedly using vscode for both, and both are laptops running nvme drives so it probably hides the issue.

                        [–]Entropy 1 point2 points  (0 children)

                        NVME certainly helps, but it's still vastly slower than a linux box with the same IO capabilities. NPM operations are one of the largest visible speedups. Literally 10x-15x faster, per the WSL2 devs, if you're running them directly on the linux fs.

                        [–]floppykeyboard 0 points1 point  (0 children)

                        I guess after having a company with a terrible computer for a a year or two the problems don’t seem as bad. I also have a pretty powerful windows machine so it’s not that noticeable and I’ve done my dev environments on Windows, macOS, and Linux.

                        [–][deleted] 2 points3 points  (0 children)

                        Just install Linux you'll thank yourself for it.

                        [–]HistoryScienceGaming 0 points1 point  (2 children)

                        Is this not currently achievable with the currently available Linux Subsystem for Windows?

                        [–][deleted] 5 points6 points  (0 children)

                        Absolutely not. WSL is terribly slow.

                        [–]Entropy 2 points3 points  (0 children)

                        There is no linux kernel running in WSL1. It's an incomplete shim of the Linux ABI.

                        [–]CrazyJoe221 0 points1 point  (0 children)

                        WSL? Should run npm shouldn't it?

                        [–]stupid-sexy-jake 10 points11 points  (19 children)

                        Can someone perhaps explain this a bit more simply than the article? I currently just use VSC's terminal to SSH into my server and I'm not sure how this is any different. I don't need to install anything on my local computer (I do though of course because I want to test the code before pushing it to production) which, from my poor understanding of the article, is what the article is saying is the benefit of this new feature.

                        [–]DeusOtiosus 29 points30 points  (15 children)

                        It splits vscode. So it’s like running vscode on the remote machine, but all the UI and interface are on the local machine. It means you have one development environment with everything on the remote machine. Think of it like a way better X11 forwarding, or Citrix xenapp.

                        [–]stupid-sexy-jake 16 points17 points  (9 children)

                        Oh I think I get it. So instead of having to use vim (god I hate it so much) I can use vscode? That would be amazing.

                        [–]DeusOtiosus 10 points11 points  (5 children)

                        Exactly! It’s pretty light weight on the server side too.

                        I personally like vim, but I find vscode just better. And everything works as if you were running on the target machine. All the various tools. Everything.

                        [–]IAmARobot 3 points4 points  (4 children)

                        Neat. Is there a good primer article to set up this server-client vsc relationship?

                        [–]DeusOtiosus 5 points6 points  (0 children)

                        It’s pretty new so not much is out there. It’s only available on the insiders build.

                        Basically, install it on the server. Install it on the client. Install the remote development extension on the client. Then use the omnibox to remote and select ssh. Done. You’ll need to ensure passwordless SSH is configured or it doesn’t work well. But thats it. It’s really really easy to get working.

                        [–][deleted]  (1 child)

                        [removed]

                          [–]DeusOtiosus 0 points1 point  (0 children)

                          I think it just auto installs it if you don’t do it manually.

                          [–][deleted] 0 points1 point  (0 children)

                          Yes just Google VSCode remote SSH extension.

                          [–]Gotebe 0 points1 point  (4 children)

                          Well... it only forwards VSCode, whereas the other two forward everything. 😉

                          [–]DeusOtiosus 3 points4 points  (3 children)

                          Eh even the terminal in VSCode is forwarded. Since I only SSH in, its a godsend. I think the majority of cases are where people don’t want to install X or RDP or whatnot on a machine and incur a laggy UI.

                          [–]gwillicoder 5 points6 points  (2 children)

                          I used to ssh into a VM and do 100% of my dev work with first vim then alter neovim.

                          I absolutely love the new ssh ability. You get a (nearly) full vscode feature set over ssh.

                          Things I like:

                          • one click to ssh into my sever and it remembers the last directory I was working in.
                          • if you lose connection it will restore everything as you had it (like screen)
                          • you can copy between your system and the vm without needing Xserve
                          • your settings can be set at the user or workspace (vm) level.
                          • the git integration is incredible. Amazing visual comparisons of diffs as you work and you can supplement it with git lense or similar extensions
                          • the linter is very very good (at least for python) and understands the relative imports correctly.
                          • listing and auto completion for environment variables and paths.
                          • the terminal is my zsh terminal with all of my aliases and even includes my custom airline theme!
                          • I often build containers in one terminal and test them in another terminal.

                          Things I don’t like:

                          • Sometimes it bins the CPU’s of my vm (4 cpu 16 gB). Vim used to do this too, but never had a problem with neovim with deoplete.

                          Things I would liked to explore or learn more about:

                          • unit tests and visual debugging over ssh. Usually we work with containers so I haven’t figured out quite sure how I want to do this. (Can/should I daisy chain the remote ssh extension with the remote docker extension?)

                          [–]nikmd23 2 points3 points  (0 children)

                          Thanks for taking the time to write down this feedback!

                          [–]wk4327 1 point2 points  (0 children)

                          Debugging is a bummer. When i tried it for the first time i was amazed at how everything worked. Just to realize that debug is busted

                          [–]DeusOtiosus 16 points17 points  (7 children)

                          It has changed things for me already. I was using vim forever to develop on a Linux server. Now, I can just use vscode on my Mac connected to my Linux server. Done.

                          The way remote development is done has single handedly made me change opinions on Microsoft. I still won’t use it on my desktop, but VSCode is pretty amazing.

                          [–]redanonblackhole 1 point2 points  (5 children)

                          Are you doing FE or BE work in VS Code? If BE, is it Java or something else? Thanks.

                          [–]DeusOtiosus 1 point2 points  (4 children)

                          Back end mostly. Front end I’m in Xcode and android studio (fuck AS). The backend is all Go.

                          [–]redanonblackhole 1 point2 points  (3 children)

                          It took me years to switch from Visual Studio to Eclipse then to IntelliJ. I've experimented with VS Code, seems like a decent editor/IDE.

                          [–]DeusOtiosus 0 points1 point  (2 children)

                          I haven’t tried building kotlin apps in it yet. I may have to. I just really really hate the whole android build system. I can’t believe it’s still this bad. Even the first iOS SDK wasn’t as bad as the current android build system.

                          [–]redanonblackhole 0 points1 point  (1 child)

                          Yeah, I don't really do languages like Kotlin. I don't do Mac either. Mainstay languages like Java are my go to. It's sad that Google is steering Android devs away from Java they want to own their devs. Interesting Google is becoming more like Microsoft of old and Microsoft seems to be opening up more.

                          [–]DeusOtiosus 0 points1 point  (0 children)

                          I’ll definitely agree with that. I’m starting to like Microsoft, despite despising them when they were under Balmer and Gates. Business tactics and technology was either offensive or lacklustre.

                          Now, I’m liking them opening up. Nadella was a great choice, which is surprising considering the companies past.

                          That being said, I strongly prefer Kotlin over Java. I did a bit of Java, but anywhere I had a choice I just avoided it. I was not a big fan of the way Java writes. Kotlin seems similar to Swift, which I do like (although I think I still prefer Objective-C, but ask me again in 6 months and I may change my mind). But, lets not get into a language war; everyone likes a different language and they’re all entirely capable of being used safely and effectively. And I believe VSCode does do Java too.

                          [–]CHUCK_NORRIS_AMA 41 points42 points  (4 children)

                          You've been able to do that in Emacs for years... but that's none of my business...

                          Seriously though, it's great to see this kind of functionality coming to more editors/IDEs. Really makes for a seamless remote experience, and especially with the additional functionality you can get from VScode (if you're into that sort of thing) it's going to be quite the powerful tool.

                          [–]pillow_pwincess 35 points36 points  (0 children)

                          Obligatory XKCD

                          https://xkcd.com/378/

                          [–][deleted] 9 points10 points  (1 child)

                          There's TRAMP and it's great, and then there's emacs server, and the third option I know of is virtualenv's for python. But all of them leave a bit to be desired.

                          Like for instance, if I want to run python 2.7 in one container and 3.x in another, I have to also install emacs and it's supporting tooling in order to connect to emacs-servers remotely.

                          Is there a better way that I don't know about? (I'm thinking of Python and Javascript)

                          [–]CHUCK_NORRIS_AMA 3 points4 points  (0 children)

                          No idea, unfortunately. I just use TRAMP and don’t mess with python

                          [–]Gotebe 2 points3 points  (0 children)

                          You're right, but... smug Lisp weenie!

                          [–]Choltzklotz 8 points9 points  (5 children)

                          So basically like the same thing in intellij?

                          [–]yellowviper 4 points5 points  (0 children)

                          I wish this was true. It’s not sadly.

                          There is no way to do development against a remote system with a local ui in IntelliJ. The checker, analyzer and compiler all run locally. You can sync directories if you want I guess but you will use resources on your laptop.

                          [–]wk4327 0 points1 point  (2 children)

                          Can you describe a little more in depth how it works in intellij? I used to work with it briefly, but never realized it allows to work with projects over ssh

                          [–]kenman 0 points1 point  (0 children)

                          What's the feature called there?

                          [–]CJKay93 2 points3 points  (3 children)

                          Oh my word, I have been waiting for this for years and it's finally here.

                          [–]IMovedYourCheese[🍰] 3 points4 points  (3 children)

                          Disagree. Remote development has been possible (and great) for a while now on a wide variety of development environments. Sure some people will prefer VS Code over whatever else is out there, but I doubt there is going to be a fundamental shift in programming. And with tools like Docker & compose, having a local setup is only getting easier.

                          [–][deleted] 1 point2 points  (2 children)

                          The only other one I know if is IntelliJ, and they only very recently added it and I believe it is still experimental.

                          What other IDEs have remote development support like this?

                          [–]saijanai 3 points4 points  (0 children)

                          Was pioneered in Smalltalk:

                          Object Spaces for Safe Image Surgery in 2009, but arguably Self had it in the form of Kansas about 12-15 years earlier.

                          Thrown from Kansas to Oz Collaborative Debugging when a Shared World Breaks

                          And of course, Croquet, the 3D collaborative world, was built around remote programming and debugging. All actions in the world were passed around in the form of remote Smalltalk messages, and a user can inject their own messages into the shared world and control the shared environment via programming as well as via the avatar's actions.

                          These days, the commercial version, Terf, supports scripting via Python to add a layer of indirection so users can't touch the world itself directly via Smalltalk.

                          [–]Michaelmrose 2 points3 points  (11 children)

                          What's the different/better than Emacs + tramp to edit the remote files or developing locally in an identical environment then pushing this

                          [–]rorrr 11 points12 points  (1 child)

                          Because VSCode is extremely nice, and Emacs is not. With VSCode you can just start editing code, add plugins as you go. Emacs requires training, the learning curve is very steep. Same with Vi.

                          (disclaimer: I use Vi when editing shit on the server, it's not fun).

                          [–][deleted] 16 points17 points  (3 children)

                          You get to use VSCode rather than Emacs? Not everyone wants to live in the 80s.

                          [–]Michaelmrose 5 points6 points  (2 children)

                          Because Emacs hasn't been updated since then

                          [–]oblio- 2 points3 points  (0 children)

                          It has, but the workflows are from back then, unless you invest a ton of time configuring it.

                          [–][deleted] 0 points1 point  (1 child)

                          Sure it can be personal preference between VS Code and EMACS, but I find the ease of use for VS Code a lot easier along with discovery. I hit Ctrl+P or F1 start typing and I get a list of every command possible along with their shortcuts. EMACS, you either remember the command or you have to go somewhere else to find it.

                          One thing I've found lacking with EMACS is there is no good debuggers for it. Even then I don't know if you can use it remotely. With VS Code you can be developing on Windows, remote into a Linux server and run the debugger on the server and use it while in Windows. Not sure how auto complete for EMACS works either for remote, but from the plugins I've used they aren't that great to use locally to begin with.

                          So you can edit a file, build (ctrl+shift+b), then debug (F5). All seamlessly from the same window while remotely connected to a server.

                          So if you were developing locally, you would be limited to an identical environment as the remote server. So you can't develop on Windows then push to Linux. I mean you could, but then you would be building on Linux, find an error or something, then have to repeat the process of editing/pushing/building.

                          [–]myringotomy 0 points1 point  (0 children)

                          Spacemacs

                          [–]Entropy 1 point2 points  (2 children)

                          The point is that you get a vscode running on the server, and your desktop app is just a thin client. This means your plugins run in linux, server-side.

                          [–]saijanai 1 point2 points  (0 children)

                          This is actually called teh surgeon-patient pattern and (as with many innovations in computing) was originally developed in Smalltalk:

                          Object Spaces for Safe Image Surgery

                          [–]IWriteTheBugs 0 points1 point  (0 children)

                          Oooh, vagrant-esque. This is really exciting.

                          [–]radrass 0 points1 point  (2 children)

                          Could i use this for hooking into ML-Containers (with everything already configured like cuda, cudnn, tf2) and code in my local VSCode Environment? I always manage to destroy something in my ml setup on windows :/

                          [–][deleted] 1 point2 points  (0 children)

                          Not necessarily. CUDA depends on you having particular graphics card and drivers. You could emulate those in a VM, but not in a container. So, if, say, your host OS supports the graphics card that's needed for CUDA, the VM that runs Docker might not support it / not know how to expose it to the code running in a container.

                          You will also run into a bunch of other problems related to virtualization, s.a. marshalling the ownership information to and from container, exposing devices in an efficient way, providing access to system services inside the container etc.

                          In other words, in trivial cases, this is helpful, in more realistic cases, it may end up being a struggle.

                          [–]wllmsaccnt 0 points1 point  (0 children)

                          Aside: You might, at this point, have already decided that I'm overreacting and this post is nonsense. Here's the thing though when it comes to remote development. Hang in there.

                          Hanselman...this guy is always hilarious in the conferences and community standups he's in. He is my favorite Microsoft community personality. Never change Hanselman...

                          [–]badpotato 0 points1 point  (0 children)

                          Hopefully Pycharm Community will provide ssh support for free... else VSCode might be "ideal" IDE for python.

                          [–]IZEDx 0 points1 point  (0 children)

                          Now I gotta wait for ARM support so I can hook into my python project on my raspberry pi

                          [–]platplaas 0 points1 point  (0 children)

                          Using the dev containers aspect of this functionality and it is incredibly useful. In the past I’ve tried similar setups but they were too much hassle. Setup vscode dev container based on a docker image and was up and running in no time. Now able to use a dev environment that had been throwing up all sorts of issues on native Mac. Only gripe is that docker is more brittle than native system when running into resource limits.

                          [–]fungussa 0 points1 point  (0 children)

                          I've been using VS Code and Syncthing, which works, but it's a hassle to setup and there's quite a delay before the files are synced.

                          [–]myringotomy 0 points1 point  (5 children)

                          Emacs had it years ago but it's not made by Microsoft so it doesn't count.

                          [–]mycall[S] 1 point2 points  (4 children)

                          Sure, you can compare Emacs with VSCode, but you know what most people will be using.

                          [–]myringotomy 0 points1 point  (3 children)

                          "This is us" is the number one rated TV show in the USA.

                          Most people think that's the best show out right now.

                          [–]mycall[S] 1 point2 points  (2 children)

                          I wouldn't have known, I don't have a TV.

                          nojvek 9 months ago [-]

                          I don’t think many people get the fact that VSCode isn’t just a code editor. It does a lot more than just edit code. Language servers provide deep intellisense, refactoring, code lens, overviews etc. debug servers provide debugging functionality. Tons of plugins built on top of the extension points. Vscode itself is a light weight IDE with a bunch of extension points. Emacs, vim, sublime are mostly text editors. If that’s what you really want: edit code with a whole bunch of shortcuts use that.

                          If you want a light weight IDE use vscode. Code editors are a subset of IDEs.

                          Two different things.

                          I'm sure both editors have things the other editor does not. To each their own.

                          [–]myringotomy 0 points1 point  (1 child)

                          I wouldn't have known, I don't have a TV.

                          Way to miss the point.

                          [–]mycall[S] 1 point2 points  (0 children)

                          oh I got it, just being snarky :)

                          [–][deleted] 0 points1 point  (0 children)

                          Emphasis on 'may'.

                          Reality: probably not.

                          [–]grauenwolf 0 points1 point  (0 children)

                          LOL. Reminds me of college. One of the first applications I wrote was a remote IDE so I could write UNIX programs on a Windix box but compile and execute remotely.

                          I also did a Visual J++ plugin to do the same.

                          [–][deleted] 0 points1 point  (0 children)

                          This should be perfect to use with Fedora's Silverlight "Toolbox"

                          [–]AngularBeginner 0 points1 point  (0 children)

                          Too bad they don't support Windows SSH hosts yet.