This article is more than 1 year old

GitHub Codespaces: VS Code was 'designed from the get-go' for this, says Microsoft architect

A compelling addition to repo house – but is the Redmond flavour too strong?

GitHub had a lot to say about its plans at its virtual Satellite event yesterday, but the most far-reaching was the advent of Codespaces, the ability to edit code online, integrated into the GitHub user interface.

Never a company to avoid confusing names, Microsoft announced its own Codespaces just one week ago; or rather a rebranding of the previously announced (in November 2019) Visual Studio Online. The name Visual Studio Online was itself repurposed as the name was originally used for what became Azure DevOps.

Microsoft principal program Manager Nik Molnar did not mention GitHub in his announcement of Visual Studio Codespaces, but it seems unlikely that picking the exact same name as GitHub is a coincidence (Microsoft owns GitHub). Despite this, Visual Studio Codespaces is not quite the same thing as GitHub Codespaces, though they look like versions of the same product.

Creating a Visual Studio Codespace

Creating a Visual Studio Codespace

There are a few distinct technologies to think about. One is the idea of editing code in the browser. Visual Studio Code is well suited to this because it is coded with the JavaScript-compatible TypeScript language, and uses the Electron framework, which is built on the Chromium browser engine. Microsoft's Project Monaco was for exactly this purpose, and was developed by Erich Gamma, who came to the company from IBM having worked on the IBM-sponsored Eclipse project.

Back in 2013, journalist Mary Jo Foley interviewed Gamma, who explained that the first use case was to allow developers to edit Azure websites from the browser. Foley also reported that "the Monaco team decided against building a Metro-Style/Windows Store version of Visual Studio. The browser/toolbox route made more sense, Gamma said." A good decision.

The Monaco brand lives on as the code editor component in Visual Studio Code, though note that VS Code itself was not launched until April 2015. Few guessed that five years on it would be the most popular editor out there – but the term editor no longer does its scope justice.

Editing code in the browser can be important, but this is not the only or even the core feature of Codespaces. Developers need not just an editor, but the ability to run and debug code. In addition, VS Code extensions – the feature that makes it so capable – have dependencies that may include compilers and SDKs that run on the machine where VS Code runs. This is why Codespaces (in both Microsoft and GitHub guise) is a dedicated Linux virtual machine (or a container on a VM).

Microsoft Codespaces has a minimum spec of two cores, 4GB RAM and 64GB SSD storage. You can use this without running VS Code in the browser at all, by using VS Code on the desktop and its remote capabilities. GitHub's description says: "You can contribute code from any device, using VS Code or your browser." Running VS locally means you get the performance of a local code editor but the messy stuff like Java and Node.js SDKs runs on the remote server. It is helpful because maintaining the correct configurations of runtimes and SDKs for multiple projects on a single developer machine can be a headache.

The Code button that will appear in Codespace-enabled GitHub repositories

The Code button in Codespace-enabled GitHub repositories

There is still a role for editing in the browser and this is the attraction of the new Code button in Codespace-enabled projects. This will open the browser-based version of VS Code backed by a container running in a VM as described above. You will be able to customise this for each project by editing a devcontainer configuration file. You can also have a dotfiles repository that will store your preferences for the Codespaces environment, which will be automatically picked up. Since it is in effect VS Code running remotely, it is compatible with any VS Code extension and works in broadly the same way as it would on your desktop. The integration between GitHub and Codespaces seems mainly based on an enhanced version of an existing extension, GitHub Pull Requests and Issues. You can also forward a port from the remote server to your local machine, so you can test and debug web applications.

This GitHub extension is pre-configured in Codespaces

This GitHub extension is pre-configured in GitHub Codespaces

According to Microsoft partner software architect David Fowler: "The team that built VS code designed it from the get-go with this vision in mind. The out-of-process language server model made it much easier to accomplish this."

There are some details yet to be revealed. One is the pricing: GitHub's FAQ says "plans and pricing will be announced as the beta progresses." Another is the specifications for the VMs; GitHub CEO Nat Friedman said in the Satellite keynote that there will be various configurations, including GPU options presumably for concurrent programming. He also mentioned some future plans, including a serverless option that would run in the browser "with no need to consume cloud resources". GitHub Codespaces currently has some annoyances including a requirement to use a Chromium-based browser. "Firefox is currently unsupported, and there are known issues using Safari," says the troubleshooting guide, though this may not be the case when it comes out of preview.

When Microsoft rolled out Visual Studio Online, it did not seem of much significance, especially given the relatively high prices, though these have now been reduced. The integration with GitHub, though, makes the concept more compelling. If you can live with the cost of spinning up a cloud VM when you are coding, it makes for a convenient option that works the same way from any device, provided you have the right kind of web browser. Key to its appeal is that VS Code is a familiar environment to many developers.

Why did Microsoft change the name of Visual Studio Online? This may be because of a sensitive issue, which is that GitHub is keen to be perceived as technology-agnostic rather than as a Microsoft-platform service. If Friedman had announced Visual Studio Online for GitHub, it would have been muddied that message. Codespaces is presented as a GitHub service, though it is obvious that the two are based on the same technology, which will lend weight to critics who say the platform is not neutral, though Codespaces is just VS Code running on Linux, so is not particularly Microsoft-flavoured.

Rival online development service Gitpod makes a point of its independence, saying: "Most professional development happens on other platforms such as GitLab, Atlassian's stack and of course good old GitWeb. Oftentimes companies even employ a mixture of these... To serve users beyond just GitHub we have been focusing on integrating Gitpod with other platforms as well."

Even more than the IBM/Red Hat relationship, the Microsoft/GitHub union means the company has to strike a careful balance between getting strategic benefit from the developers on the platform (now 50 million in number, according to Friedman), while remaining a comfortable platform for competitors as well as allies. ®

More about


Send us news

Other stories you might like