VS Code or VS Codium?
Tags: tooling, vscode, webdev
Published: 2022-05-31 10:20:25


[VS Code](https://code.visualstudio.com) 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](https://vscodium.com/) 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?

<img src="https://www.roboleary.net/assets/img/blog/2022-05-31-vscode-vscodium-which-should-i-use/giveaway.jpg" alt="large sign with word giveaway" width="1000" height="667" loading="lazy">

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”](https://www.theregister.co.uk/2001/06/02/ballmer_linux_is_a_cancer/). 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"](https://www.itproportal.com/news/microsoft-admits-it-was-wrong-about-open-source/).

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](https://www.cfajournal.org/goodwill-in-balance-sheet/), it is good for the value of the business to be more highly regarded.

<img src="https://www.roboleary.net/assets/img/blog/2022-05-31-vscode-vscodium-which-should-i-use/balance-sheet.jpg" alt="handwritten account book" width="1000" height="665" loading="lazy">

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](https://vscode.dev/), a code editor in the browser. As a [VS Code blog post](https://code.visualstudio.com/blogs/2021/10/20/vscode-dev) 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](https://github.com/) (owned by Microsoft) has started a paid product called [Codespaces](https://github.com/features/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](https://github.co/codespaces-billing). The pricing looks modest enough, but I'm sure they are starting to make some money from it by now.

<img src="https://www.roboleary.net/assets/img/blog/2022-05-31-vscode-vscodium-which-should-i-use/codespaces.jpg" alt="screenshot of codespaces homepage" width="1000" height="611" loading="lazy">

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](https://visualstudio.microsoft.com/) off as a paid product, Visual Studio is available in different editions and is part of a [subscriptions offering](https://visualstudio.microsoft.com/subscriptions/). 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 <kbd>.</kbd> on any page of a repository, it will open the [web-based VS Code editor](https://docs.github.com/en/codespaces/the-githubdev-web-based-editor).

Prior to being acquired by Microsoft, GitHub made their own open-source code editor too, [Atom](https://atom.io/). 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.

<img src="https://www.roboleary.net/assets/img/blog/2022-05-31-vscode-vscodium-which-should-i-use/developers.jpg" alt="meme of ballmer at sales conference with title of developers, developers, developers" width="577" height="443" loading="lazy">

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](https://www.roboleary.net/tools/2022/04/20/vscode-telemetry.html), 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](https://github.com/microsoft/vscode)) under a [MIT license](https://github.com/microsoft/vscode/blob/main/LICENSE.txt). 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                                                    |
| ---------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
| Organisation          | [Microsoft](https://en.wikipedia.org/wiki/Microsoft)         | [VSCodium](https://en.wikipedia.org/wiki/Microsoft)          |
| Repository license     | [MIT](https://github.com/microsoft/vscode/blob/main/LICENSE.txt) | [MIT](https://github.com/VSCodium/vscodium/blob/master/LICENSE) |
| Product license        | [Microsoft product license](https://code.visualstudio.com/License/) | [MIT](https://github.com/VSCodium/vscodium/blob/master/LICENSE) |
| Build process          | Microsoft has a custom build that clones the "`Code - OSS`" repo and adds some Microsoft customizations to create the final product with a different license. | VSCodium clone Microsoft's "`Code - OSS`" repo and add some community-based customisations to create the final product. |
| Marketplace (registry)   | [Microsoft Visual Studio Code Marketplace](https://marketplace.visualstudio.com/VSCode). The marketplace code is <u>proprietary</u>. The [Terms of Use](https://aka.ms/vsmarketplace-ToU) state that extensions in the marketplace are only to be used with Microsoft products. | [Open VSX Registry](https://open-vsx.org/). The [marketplace code](https://github.com/eclipse/openvsx) is open-source ([Eclipse Public License 2.0](https://www.eclipse.org/legal/epl-2.0/)). There are no restrictions on the use of extensions. |
| 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.

### Organisation

[Microsoft](https://en.wikipedia.org/wiki/Microsoft) is a big 'ol software company. Don't be misled by the name.

[VSCodium](https://vscodium.com/) is some open-source folks (I guess).

### Licensing

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](https://code.visualstudio.com/License/), whereas VS Codium is under a  MIT license.

### Build process

According to [this comment](https://github.com/Microsoft/vscode/issues/60#issuecomment-161792005) 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](https://github.com/Microsoft/vscode/issues/141340) and [Microsoft/vscode#45978](https://github.com/Microsoft/vscode/issues/45978). These are the packages downloaded during build:

- Extensions from the Microsoft Marketplace:
  - [ms-vscode.references-view](https://marketplace.visualstudio.com/items?itemName=ms-vscode.references-view)
  - [ms-vscode.js-debug-companion](https://marketplace.visualstudio.com/items?itemName=ms-vscode.js-debug-companion)
  - [ms-vscode.js-debug](https://marketplace.visualstudio.com/items?itemName=ms-vscode.js-debug)
  - [ms-vscode.vscode-js-profile-table](https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-js-profile-table)
- From Electron releases:
  - electron
  - ffmpeg

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](https://github.com/VSCodium/vscodium/releases) section of the vscodium repo.

### Marketplace (registry)

VS Code is configured to use the [Microsoft VS Code Marketplace](https://marketplace.visualstudio.com/VSCode). Its [Terms of Use](https://aka.ms/vsmarketplace-ToU) restricts access to Microsoft and GitHub products only. A number of key Microsoft extensions are only allowed to be used with Microsoft products, the legalese wording of this is the following from section 1b:

>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](https://open-vsx.org/). This registry is developed and maintained under the [Eclipse Open VSX](https://github.com/eclipse/openvsx) 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](https://open-vsx.org/) in addition to the VS Code Marketplace. The publishing process is documented in the [Open VSX Wiki](https://github.com/eclipse/openvsx/wiki/Publishing-Extensions).
- Create a pull request to [this repository](https://github.com/open-vsx/publish-extensions) to have the [@open-vsx](https://github.com/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](https://code.visualstudio.com/docs/editor/extension-gallery#_install-from-a-vsix) 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](https://www.npmjs.com/package/vsce) for VS Code, and [ovsx](https://www.npmjs.com/package/ovsx) for Open VSX. They are quite similar.

I have written [a number of extensions](https://marketplace.visualstudio.com/publishers/robole), and I use the [`publish-vscode-extension` GitHub action](https://github.com/HaaLeo/publish-vscode-extension) to publish my extensions to both marketplaces.

### Proprietary extensions

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)](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp): Official C# language support. The extension is subject to [this restrictive license](https://github.com/OmniSharp/omnisharp-vscode/blob/master/RuntimeLicenses/license.txt) because it uses Microsoft's proprietary debugger. The source code is available under a MIT license. See [this comment in the C# extension repo](https://github.com/OmniSharp/omnisharp-vscode/issues/2491#issuecomment-418811364) for some discussion on this. There is an [alternative version of the C# extension](https://open-vsx.org/extension/muhammad-sammy/csharp) in the Open VSX Registry that uses Samsung’s MIT-licensed Debugger.
- [C++ language](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools): Official C++ language support. The extension is subject to [this restrictive license](https://github.com/microsoft/vscode-cpptools/blob/main/LICENSE.md).  You can see [this comment in the extension repo](https://github.com/Microsoft/vscode-cpptools/issues/21#issuecomment-248349017) for clarification of this.
- [Live Share](https://marketplace.visualstudio.com/items?itemName=MS-vsliveshare.vsliveshare): Collaboratively edit and debug with others in real time in your editor. The extension is subject to [this restrictive product license](https://microsoftdocs.github.io/live-share/license/eula.html) (use solely with Microsoft Visual Studio family of products).
- <u>Remote Development Extensions</u>:  Allows you to open any folder in a container, on a remote machine, or in the [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl). The [Remote Development extension pack](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack)  follows [this restrictive license](https://code.visualstudio.com/preview-license), and contains the following extensions:
  - **[Remote - SSH](https://aka.ms/vscode-remote/download/ssh)** - Work with source code in any location by opening folders on a remote  machine/VM using SSH.
  - **[Remote - Containers](https://aka.ms/vscode-remote/download/containers)** - Work with a separate toolchain or container based application by opening any folder mounted into or inside a container.
  - **[Remote - WSL](https://aka.ms/vscode-remote/download/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](https://code.visualstudio.com/docs/supporting/oss-extensions).

### Telemetry (data sharing)

As Microsoft states in their [docs on telemetry](https://code.visualstudio.com/docs/getstarted/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.telemetryLevel` and `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](https://code.visualstudio.com/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](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp) and the extensions in the [Remote Development extension pack](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack). To [quote Microsoft](https://code.visualstudio.com/docs/getstarted/telemetry#_extensions-and-telemetry):

> 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?](https://www.roboleary.net/tools/2022/04/20/vscode-telemetry.html).

## 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.