VS Code is a mostly open-source code editor, with proprietary sprinkles on top, and a proprietary extension marketplace. It is a bit of a mongrel breed of software really. VS Codium is a fully open-source alternative based on the same codebase.
There is more to it than that! It requires some unpacking! Before we dive into the specifics, it is probably worthwhile to understand why is a huge for-profit company giving away a high-quality product for free!
Why is VS Code free?
It is not a simple question to answer really, and I am speculating here, but…
It is good for the reputation of Microsoft to be seen as a player in open-source. In the olden days, Microsoft was a strong antagonist to open-source. In 2001, Microsoft CEO Steve Ballmer famously branded Linux “a cancer that attaches itself in an intellectual property sense to everything it touches”. In 2020, Brad Smith, a Microsoft president, admitted “Microsoft was on the wrong side of history when open source exploded at the beginning of the century, and I can say that about me personally”.
Now that their operating system is not the cash cow it once was, they have had to pivot. Their cloud computing business and dev-related offerings are making up a growing portion of their balance sheet. Now devs are probably more influential in purchasing their digital products and services than before. And more generally, since good will is an actual line item on a company’s balance sheet, it is good for the value of the business to be more highly regarded.
VS Code is built as a lightweight editor, the core functionality is aimed at front-end development. They get voluntary contributions from the community to maintain and extend those features. More importantly, the community is building the majority of the the functionality for other languages and non-core features through extensions. Free-ish labour? Yes, please.
Recently, VS Code has been released as a new online product, vscode.dev, a code editor in the browser. As a VS Code blog post said:
Bringing VS Code to the browser is the realization of the original vision for the product. It is also the start of a completely new one. An ephemeral editor that is available to anyone with a browser and an internet connection is the foundation for a future where we can truly edit anything from anywhere.
GitHub (owned by Microsoft) has started a paid product called Codespaces, which uses VS Code in virtual machines (VMs). It was rolled out in August 2021 and is only available to GitHub Teams and GitHub Enterprise Cloud customers currently. Full details on pricing is available in their documentation. The pricing looks modest enough, but I’m sure they are starting to make some money from it by now.
Because some of the software related to VS Code is proprietary, there are commercial avenues Microsoft can explore in the future. It certainly hasn’t killed Visual Studio off as a paid product, Visual Studio is available in different editions and is part of a subscriptions offering. This is probably why the C# and C++ extensions for VS Code have restrictive licenses.
I guess if there is close integration of VS Code with other Microsoft products, it can be touted as a feature to hook people in. You can see this integration with GitHub now, if you press . on any page of a repository, it will open the web-based VS Code editor.
Prior to being acquired by Microsoft, GitHub made their own open-source code editor too, Atom. Atom is still actively maintained. It just goes to show how they purused similar stratgies in the long-run. I guess that the philosophy is to make tools for devs, and create an “ecosystem” to sell something extra.
The telemetry from VS Code gives Microsoft insights on trends and helps with product development. It is kind of a marketing tool for them to gather field research. Telemetry follows an opt-out model, so it is important enough for them to nag you with a notification when you install the application. As I discuss in a previous article about telemetry in VS Code, the product is licensed and designed in a way that you cannot avoid all data collection.
These are my guesses anyway.
Since ostensibly this is largely aligned with what devs want, a great (mostly) open-source code editor at a price of zero cent, many people are happy with VS Code.
Overview and comparison of projects
The majority of the code behind the Visual Studio Code editor is available in a GitHub repo (microsoft/ vscode) under a MIT license. It is referred to as the “
Code - OSS” repo by Microsoft. There is a build process that takes the code in this repo and creates a customized product that is the actual software that you install and use.
|VS Code||VS Codium|
|Product license||Microsoft product license||MIT|
|Build process||Microsoft has a custom build that clones the “ ||VSCodium clone Microsoft’s “ |
|Proprietary extensions||You can use all Microsoft extensions.||A few of Microsoft’s extensions are restricted. Some are blocked from running outside of VS Code.|
|Telemetry (data sharing)||Enabled by default.||Disabled by default.|
Let’s look at these aspects one by one.
Microsoft is a big 'ol software company. Don’t be misled by the name.
VSCodium is some open-source folks (I guess).
Both the source code of VS Code and VS Codium are under a MIT license.
The built application of VS Code is under Microsoft product license, whereas VS Codium is under a MIT license.
According to this comment from a Visual Studio Code maintainer:
When we [Microsoft] build Visual Studio Code, we do exactly this. We clone the vscode repository, we lay down a customized product.json that has Microsoft specific functionality (telemetry, gallery, logo, etc.), and then produce a build that we release under our license.
When you clone and build from the vscode repo, none of these endpoints are configured in the default product.json. Therefore, you generate a “clean” build, without the Microsoft customizations, which is by default licensed under the MIT license
Microsoft’s build process also downloads additional files. This was brought up in Microsoft/vscode#141340 and Microsoft/vscode#45978. These are the packages downloaded during build:
- Extensions from the Microsoft Marketplace:
- From Electron releases:
VS Codium was created to save you from downloading and building from source yourself, and adds some community customization. The resulting binaries are added to the releases section of the vscodium repo.
Marketplace Offerings are intended for use only with In-Scope Products and Services and you may install and use Marketplace Offerings only with In-Scope Products and Services
The code to the marketplace is proprietary. As a result, the source code cannot be reused to create an internal extension registry for developers, or to contribute new features and enhancements to the marketplace.
The naming irks me, why call it a marketplace when you can’t sell anything!
While there is no indication that it will happen, there is nothing stopping Microsoft from changing the terms and conditions in the future. It leaves the door open for them to pivot if they wish to do something commercial.
To publish an extension to the marketplace, it requires some hoop-jumping. You must have a Microsoft/Azure account and follow some odd steps.
VS Codium is configured to use its Open VSX Registry. This registry is developed and maintained under the Eclipse Open VSX project. It is vendor neutral, so it can be used with any technology or tool. Examples are: VSCodium, Eclipse Theia, Eclipse Che, Gitpod, Coder, and SAP Business Application Studio.
The code is completely open source. So, it is possible for anyone to create their own registry and use it privately. As a result, you can maintain precise control over your extension’s availability. This is very similar to common practice found in other ecosystems such as npm, Cargo, and Maven.
Since the Microsoft VS Code Marketplace is more established and has more users, you are likely to miss some extensions that are available there. You have the following options to obtain the missing extensions:
- Ask the extension maintainers to publish to open-vsx.org in addition to the VS Code Marketplace. The publishing process is documented in the Open VSX Wiki.
- Create a pull request to this repository to have the @open-vsx service account publish the extensions for you. It appears that they run a batch job to keep them up-to-date.
- Download and install the vsix files yourself.
To publish to the Open VSX marketplace has less requirements and steps than Microsoft’s set-up.
Both marketplaces offer a CLI tools to publish and manage your extensions, vsce for VS Code, and ovsx for Open VSX. They are quite similar.
I have written a number of extensions, and I use the
publish-vscode-extension GitHub action to publish my extensions to both marketplaces.
Some VS Code extensions have licenses that restrict their use to the official Visual Studio Code builds. If you ignore the licenses and try to run them in VS Codium, some extension won’t work because there is an internal check that prohibits them from running outside of VS Code.
Here is a list of some of the extensions with restricted licenses/usage:
- C# language (powered by OmniSharp): Official C# language support. The extension is subject to this restrictive license because it uses Microsoft’s proprietary debugger. The source code is available under a MIT license. See this comment in the C# extension repo for some discussion on this. There is an alternative version of the C# extension in the Open VSX Registry that uses Samsung’s MIT-licensed Debugger.
- C++ language: Official C++ language support. The extension is subject to this restrictive license. You can see this comment in the extension repo for clarification of this.
- Live Share: Collaboratively edit and debug with others in real time in your editor. The extension is subject to this restrictive product license (use solely with Microsoft Visual Studio family of products).
- Remote Development Extensions: Allows you to open any folder in a container, on a remote machine, or in the Windows Subsystem for Linux (WSL). The Remote Development extension pack follows this restrictive license, and contains the following extensions:
- Remote - SSH - Work with source code in any location by opening folders on a remote machine/VM using SSH.
- Remote - Containers - Work with a separate toolchain or container based application by opening any folder mounted into or inside a container.
- Remote - WSL - Get a Linux-powered development experience from the comfort of Windows by opening any folder in the Windows Subsystem for Linux.
There are more too - here is a list of Microsoft extensions with their licenses.
Telemetry (data sharing)
As Microsoft states in their docs on telemetry:
Visual Studio Code collects telemetry data, which is used to help understand how to improve the product. For example, this usage data helps to debug issues, such as slow start-up times, and to prioritize new features. While we appreciate the insights this data provides, we also know that not everyone wants to send usage data and you can disable telemetry as described in disable telemetry reporting.
There are telemetry settings,
telemetry.enableCrashReporter, which are enabled in VS Code by default. These settings do not turn off telemetry 100% (as stated in section 2.a of the license).
When you first install VS Code, you are presented with a dialog giving you the option to opt out of telemetry.
VS Codium turns these telemetry settings off by default, and the organization looks to restrict all telemetry.
Extensions do not follow the global settings. Some of Microsoft’s extensions send telemetry data such as the C# language extension and the extensions in the Remote Development extension pack. To quote Microsoft:
VS Code lets you add features to the product by installing Microsoft and third-party extensions. These extensions may be collecting their own usage data and are not controlled by the telemetry.telemetryLevel setting. Consult the specific extension’s documentation to learn about its telemetry reporting and whether it can be disabled.
So, if you want to opt out of all telemetry, then you need to look at your extensions also.
I discuss this topic in more depth in the following article, VS Code - What’s the deal with the telemetry?.
Should you switch from VS Code to VS Codium?
The answer is “Yes”, if you want to:
- Use 100% open-source software,
- If you want to run a private extension registry,
- If you want to support a product that minimises telemetry reporting (data sharing) by default,
- Or you are paranoid about some kind of mischief being afoot with Microsoft.
Otherwise, the answer is “No”, I suppose!
The editors are very, very similar in what they do. I have been using them side-by-side for a while, and for me it is the same now. Switching was a smooth experience for me, but I have seen some people have some issues.
The only limitation with VS Codium is the absence of the proprietary extensions in the Open VSX marketplace, however there are some alternatives for them. C# appears to be covered. It is up to the community to make their own versions of these extensions to make things exactly the same.