Why do you suffer to use a local server/internet for development? I've been using the "laptop is a dumb terminal" paradigm for many, many years and I've avoided a lot of headache that I've seen in others trying to get everything to work "locally".
Yes, this means I need to be online to work, but almost nobody works offline anymore - between googling issues, downloading/updating dependencies, and browsing while compiling, having an internet connection is assumed.
Remote development is tricky indeed. Many people run the IDE locally and use its remote development functionality. I run it remotely over VNC.
I've been wanting to try out remote developing for multiple years now, it would allow me to get an iPad with a perfect battery life or an Macbook Air that would tag along all day without charging. But because I cannot work with vim/emacs and my IDEs (IntelliJ) do not support anything like remote development I am stuck with a huge Macbook Pro including a battery draining IDE that cannot be ran remotely. VNC added too much lag for me to use all day.
I feel like this is the best of both worlds- but it does require some up front effort to build the pipeline
It didn’t even occur to me that this was a foreign concept to folks!
As someone who’s been fairly mobile/nomadic most of my career, I have always enjoyed the thin client approach.
I can get many more years of service from my client hardware when offloading the bulk of compute, storage, and stable bandwidth needs to beefy servers.
I’ve found that it’s just generally more economical and efficient this way.
Plus, the few times I’ve had laptops die, get stolen, damaged etc to have a much lower impact when they don’t have anything all that important on them.
Using VSCode in this way makes you much less dependent on good SSH. When using emacs in a terminal over SSH, your whole UI is being rendered over SSH and any latency or packet loss is going to affect UI feedback and rendering.
If you use VSCode Remote-SSH, you UI is rendered locally, so typing and editing work smoothly, and you don't really notice a bit of network latency on a request to "find in files" for instance.
Running your emacs locally and then using Tramp to edit remote files (as suggested elsewhere) gives you some of that benefit but is a much more limited development experience, and (in my experience) flakier.
(If you already know, well, I'm sure someone else just learned something today.)
The issue I ran into with editing code through tramp is the integration with make. I use `M-x compile` to compile from emacs, with a few modifications to find the appropriate makefile depending on which project I am working on. If I try to compile locally based on remote files, my compile times go through the roof. I suppose I could have opened an ssh session in which to run make, but it was easier to open emacs remotely.
The other advantage is that I could use tmux+emacs to have everything remote, and to connect to that same session from multiple computers. A typical day during an experiment might have me start in an office, later head to an experiment monitoring room, and later head down to the experiment vault to see if an issue is being caused by hardware. With remote editing, I could have the the entire session, including any files that I have already opened, no matter where I am physically located.
Docs are here: https://www.gnu.org/software/tramp/#index-compile
Also, security policies. But I like the first reason more.
Then again, my laptop won't run friggin mosh, because of security policies.
This can be all done in a VM, of course. I personally like the remote server, especially since they can be spun up so easily with cloud services now.
[1] - Though sometimes that's impossible. I.e. embedded.
ADD: I do switch frequently between my desktop and multiple notebooks. Working this way means I can have a beefy/noisy development server and a light & quiet notebook which just needs mosh.
Also, I have a mosh client on my smartphone; setting up the dev environment there would be a bear. Essentially the mainframe model ;)