Skip to content

About the author of Daydream Drift

Tomasz Niezgoda (LinkedIn/tomaszniezgoda & GitHub/tniezg) is the author of this blog. It contains original content written with care.

Please link back to this website when referencing any of the materials.

Author:

Remote File Editing Is Coming To VSCode

Published

Microsoft is getting serious about spreading VSCode everywhere. Being able to edit files remotely can be very useful to server admins and developers working on large projects. These often need much processing power a local PC cannot provide. Facebook is one example of a company which has its developers upload all source code changes to remote servers via Nuclide, an Atom extension. I myself have developed multiple projects by connecting to remote machines running on AWS and Digital Ocean. Microsoft's decision to better support such scenarios may be related to Facebook's ending support for the Nuclide open source project.

One of the features the VS Code team is adding as part of the extensions is the ability for VSCode extensions to work on the remote and return results locally. This means something like ESLint could work on the server and just display results in the local code editor.

Some extensions have already been trying to provide remote editing in VSCode. But most are too unstable. They don't handle editing files over unreliable networks gracefully. Also, some functionalities which work locally do not work as well online. One of them is the ability to search files through VSCode's search window. Unfortunately, after testing Microsoft's extensions, I've come across some of the same issues. When Remote - SSH (part of Remove Development extensions) is used offline, VSCode prevents making changes to remote files and outright locks the interface while trying to reconnect. But, suprisingly, I was also unable to save files after going back online. Only restarting VSCode helped solve this issue. On the upside, I didn't lose my changes and after restarting could finally upload them to the server.

The new extensions need some more work. In the mean time, there's liximomo's sftp extension. I've used it for years. It's stable, fast and has the added benefit of storing files locally. They can be edited when offline and uploaded later. The downside of storing a local copy of remote files is having to figure out which files are current, the local or remote ones. Still, a worthy trade-off in my view. It's the only extension that's worked well enough for everyday use.

Worth reading: discussion about Nuclides open source future after losing Facebook's support.. An interesting side topic raised during the discussion is Atom's future. Will Atom disappear after Microsoft's acquisition of GitHub, since GitHub owns Atom and MS owns VSCode?