New
Discover how Dropbox streamlined dev environments & cut costs by switching 1000 developers to Coder

Read the success story

Microsoft VS Code Server in a Coder Cloud Development Environment

Enterprises want the convenience and security of a web VS Code IDE with the ability to connect to Microsoft's VS Code Extension Marketplace to add innovative GenAI solutions like GitHub Copilot.
author avatar
Mark Milligan
 on January 2nd, 2024

One reason why Microsoft’s VS Code IDE is so popular is its rich ecosystem of extensions available to meet developers’ needs. A VS Code extension is an add-on or plugin that enhances the functionality of VS Code such as language servers, debugging, linting, and integration with other developer tools like git, Docker, Cloud Development Environments like Coder, and Kubernetes.

Coder is a Cloud Development Environment platform deployed at enterprises like banks, asset management, technology, automotive, insurance, and public sector. We have a front-row seat in these enterprises to how VS Code extensions work in concert with Coder to improve developer productivity.

Generative AI solutions like GitHub Copilot and Copilot Chat, Amazon Q and CodeWhisperer and Tabnine require a VS Code extension to perform their code generative AI magic. Coder notices in our customers that GenAI is a top-down, CIO-led imperative and their leadership relies on Coder to provide a quick on-ramp to enable these popular and innovative extensions.

For Python developers, the Pylance extension from Microsoft is a feature-rich Python language server popular with developers for its coding efficiency features like IntelliSense, auto-completion, and type checking.

Web VS Code requires no local software besides a browser and provides quick IDE access to review or write code. Enterprises with security requirements prefer web VS Code since no additional software has to be maintained or installed on a local machine. Local VS Code, on the other hand, supports all keyboard shortcuts, has lower latency when connecting to cloud development environments, and is less prone to disconnects if there are network connectivity hiccups.

A Coder cloud development environment, which we call a workspace, has a built-in easy button to open a local VS Code, download Coder’s VS Code extension and the Coder deployment’s matching Coder CLI, authenticate with a Coder workspace, and let developers start coding. Local VS Code has direct access to Microsoft’s Extension Marketplace so developers can quickly add additional extensions like GenAI ones.

A Coder workspace with Microsoft's web VS Code IDE called VS Code Server in a browser.

Developers who need a web VS Code have choices. In 2019, Coder created the popular code-server OSS project which lets VS Code run in a browser. Customers can point code-server to a private VS Code marketplace like Coder’s OSS code-marketplace. Alternatively, extensions can be added as vsix files to container images, a JFrog Artifactory server, or a shared volume attached to a Coder workspace. code-server can also point to the Open VSX Registry operated by the Eclipse Foundation. code-server and any non-Microsoft web VS Code IDE however legally cannot connect to Microsoft’s VS Code Extension Marketplace.

Unfortunately, some VS Code extensions like GitHub Copilot and Pylance are unavailable on Open VSX and not every enterprise wants to self-host an extension marketplace or manage extensions in their container images.

The good news is that Microsoft also has a web solution called VS Code Server similar to code-server. It can legally connect to Microsoft’s Marketplace as well as Coder’s self-hosted code-marketplace. VS Code Server, like code-server, works seamlessly in a Coder workspace.

You include the VS Code code CLI binary in a container image or download it as part of a Coder Terraform template along with starting VS Code Server using the code CLI subcommand serve-web which runs a server in a Coder workspace that displays the editor UI in browsers. You also add a coder app Terraform resource in the template with icon name and port to listen on, which renders as an icon in the Coder workspace. When clicked, VS Code Server opens in a browser and you start coding. VS Code extensions from the Microsoft Extension Marketplace can also be auto-installed as part of the template’s startup script for one less manual step keeping developers from being productive.

A user about to create a Coder workspace where they select if want a web VS Code, and if so, Coder's code-server or Microsoft VS Code Server.

Coder has Terraform modules on the Coder Registry for code-server and Microsoft VS Code Server. A community member also has an example template that lets the developer decide at workspace creation if they want a web VS Code, and if it should be code-server or Microsoft VS Code Server.

If you are with an enterprise who has an initiative to deploy a Cloud Development Environment platform to onboard developers faster, reduce build times, improve security, and better manage cloud costs, contact Coder to have a conversation or start a 30-day trial of Coder Enterprise.

Subscribe to our Newsletter

Want to stay up to date on all things Coder? Subscribe to our monthly newsletter and be the first to know when we release new things!