BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Microsoft Launches VSCode.Dev, Visual Studio Code in the Browser

Microsoft Launches VSCode.Dev, Visual Studio Code in the Browser

This item in japanese

Microsoft has launched the Cloud-based version of its Visual Studio Code editor through the vscode.dev domain, which offers a lightweight version of the editor which can be run right out from the browser with no installation.

Albeit not on a par with its desktop counterpart, Visual Studio Code for the Web provides quite a lot of functionality, including local file editing on browsers supporting the File System Access API, syntax coloring, text-based completions, syntax highlighting and errors, and so on. The actual availability of those features depends, though, on the particular language, since they must run entirely in the browser.

In particular, Microsoft maintains, editing, navigation, and browsing through source files is generally good for most programming languages, including Go, Rust, C/C++, PHP, and Java. This includes support for code syntax colorization, text-based completions, and bracket pair colorization. TypeScript, JavaScript, and Python use instead a new browser-native implementation of language services which additionally provides support for single file completions, semantic highlighting, and syntax errors.

The power of Visual Studio Code for the desktop comes from a wealth of extensions that enable to add new features and functionality to the editor and allow many developers to be more productive and customize their workflows. As it is understandable, not all Visual Studio Code extensions that can be used on the desktop are compatible with the web version.

When VS Code is used in the Web, installed extensions are run in an extension host in the browser, called the 'web extension host'. An extension that can run in a web extension host is called a 'web extension'.

While extensions use the same VS Code API, they cannot use the Node.js API nor load modules. According to Microsoft, most of UI customization extensions do work, but extensions that require any OS-specific npm modules or run local executables can't.

Microsoft is providing detailed steps to migrate extensions including JavaScript code to the new Web extension architecture. The work that Microsoft did to bring the language server protocol to VS Code Web can be taken as a reference for the process, including a runnable sample. Other complex extensions that have been ported to VS Code Web are the Luna Paint image editor and GitHub Issue Notebooks.

VS Code Web comes with a number of extensions that will allow you to work with GitHub, e.g., to make quick edits, review PRs, and to quickly switch to a local clone or to a GitHub Codespace if you need more power.

VS Code for the Web looks similar to github.dev, GitHub's browser-based code editor that is directly accessible from any GitHub repo or pull request. The major difference between the two solutions, being both based on VS Code, is the deeper integration of github.dev into GitHub, while VS Code Web aims to work with multiple repository hosting services, including GitHub and Azure Repos and with the possibility to support more through extensions.

It is also worth noting that VS Code Web differs profoundly from GitHub Codespaces, although the latter is also based on VS Code, in that it provides a whole environment that allows you to install plugins and run build scripts, GitHub Actions, and so on. Additionally, Codespaces remain limited to team or enterprise users, for the moment. If you are interested to explore an alternative solution to have a portable, Cloud-based development environment, you could check out gitpod.io or Eclipse Che.

Developers on Hacker News positively received the announcement of VS Code for the Web, praising its responsiveness and the possibility of transparently and effortlessly moving your development environment from one device to another and finding it in the exact same state where you left it off. Many developers also hinted at the new convenience of using an iPad or Android tablets for development tasks, including offline, or for education. A useful hint at this regard is to create an app shortcut to be able to launch into the editor from your launch screen directly, which will remove the browser chrome and make the editor handle control keystrokes correctly. On the negative side of comments, some developers raised concerns about VS Code Web being partially closed-source, with the ensueing risk of lock-in into a dev environment which could change its licensing or pricing at any time.

Visual Studio Code for the Web runs at its best on modern browsers, including Chrome and Edge. In particular, Safari's limitations make it unable to support the use of local files.

Rate this Article

Adoption
Style

BT