Visual Studio Code 1.74 released with remote tunnelling from anywhere

Visual Studio Code 1.74 released with remote tunnelling from anywhere

Microsoft has released Visual Studio Code 1.74 with new features including remote tunnelling in the stable release (though the feature is still described as preview), which enables developers to connect to any machine via a GitHub login.

The feature, which is described in detail here, allows developers to “develop against any machine of your choosing from a VS Code desktop or web client, without the hassle of setting up SSH or HTTPS,” said Microsoft senior program manager Brigit Murtaugh.

The target machine does not have to run the full VS Code but only the server component, which can be installed via an enhanced VS Code CLI (Command Line Interface).

We tried out the new tunnelling feature. Step one was to run a CLI command – code tunnel. This generated a code for use when logged into GitHub. The tunnel was not activated until we did that and approved a daunting permissions dialog giving GitHub for VS Code “full control of private repositories,” among other things. Once granted, the VS Code server generated an unique URL for our tunnel. The permission applies automatically to tunnels created subsequently.

Authorizing VS Code for remote tunnels in GitHub

We were then able to visit that URL from a remote machine on a different network, which again prompted for GitHub login. Once done, the browser version of VS Code opened at vs.dev, with access to the machine where the tunnel was running. Editing code worked, though performance was noticeably reduced, but although we could compile our .NET application, debugging did not work in this environment. We turned to a VS Code desktop installation and used the Remote Tunnels extension to connect as an alternative to the browser. Unfortunately this did not work for us, reporting an illegal argument; we are not alone, but the feature is in preview so some snags are expected.

Remote tunnel commands in VS Code

The requirement for a GitHub account is another example of how Microsoft is integrating VS Code with its code management platform, despite the product being open source.

The documentation discusses the relationship between what is now a comprehensive but perhaps confusing range of remote options. The common piece is the VS Code Server, a backend component that enables the existing remote development extension as well as the new remote tunnels and which can now be installed separately from the editor. In summary, the remote options now include:

  • Remote – SSH: connect to any location over SSH. VS Code installs the server components automatically. Requires Remote – SSH extension.
  • Dev Containers: use a container as a development environment while running VS Code on the desktop. Requires Remote Development extension.
  • Remote – WSL: on Windows, use the Windows Subsystem for Linux as the development environment. Requires the VS Code WSL extension.
  • Remote – Tunnels: Connect to any machine published via the preview Tunnels feature via the associated GitHub account. Requires the Remote Tunnels extension to connect.

On top of these there is GitHub Codespaces which is really a special case of the Dev Containers option, with the container running on GitHub.

Despite the occasional glitch, developers regard remote development as a key feature. “Remote is the killer app. I don’t like VSCode but it is the only modern editor capable of a modern native-ish local UI while running acceptable-ish code indexing and intelligence on a remote server,” said a developer on Hacker News earlier this month.

Other new features in the 1.74 update include audio cues for accessibility, easier undo and redo in the merge editor, “just my code” debugging in Jupyter notebooks, and the ability to customize which folders get automatically expanded in the VS Code file explorer.