Microsoft releases version 1.68 of Visual Studio Code: Tweaks, sponsor buttons, and continuing performance worries

Microsoft releases version 1.68 of Visual Studio Code: Tweaks, sponsor buttons, and continuing performance worries

Microsoft has pushed out version 1.68 of Visual Studio Code, also known as the May 2022 update, with numerous new features. Originally conceived as a programmer’s editor, VS Code has become the most popular development environment by some distance, according to most surveys, though whether it should be called an editor or an IDE is open to debate.

Getting to the depths of node_modules via Goto Source Definition

Tweaks in this release of VS Code include an option to hide files from the Explorer if they are in .gitignore, a table view for the Problems panel enabling developers to sort and filter by the source of each problem, and background colouring for search results in the terminal, similar to that for search results in the editor itself.

Extensions in search of funding can now add a “sponsor” button to the extension details which show up when selecting an extension from the Marketplace. The button is only a web link but still a handy way to request financial support.

Sponsor me: an optional link is now part of an extension manifest

A feature called Go To Source Definition has been added with TypeScript in mind. The problem was that Go To Definition for TypeScript code referencing exernal libraries jumped to the type definition file (*.d.ts) whereas developers are normally in search of the code that implements the function being called. According to the release notes, “One of VS Code’s longest standing and most upvoted feature requests is to make VS Code navigate to the JavaScript implementation of functions and symbols from external libraries,” and this has now been provided, though the team explains that “this may take a few seconds and we may not always get the correct result.”

The problem is that JavaScript or TypeScript projects typically have a huge pile of code hidden in a node_modules subdirectory and parsing this “would be both slow and would also dramatically increase memory usage. There are also many JavaScript patterns that the VC Code IntelliSense engine is not able to understand,” according to the release notes.

One key matter remains outstanding though, which is this issue complaining that the editor is “slow, laggy” when switching focus between VS Code and other applications. “The 2 second lag & slowness to respond when re-focusing from another program onto a VSCode tab is still there and it’s honestly starting to drive me nuts,” complained one developer, though not all suffer from the issue. The general view is that the problem is related to Electron 17, introduced in VS Code 16.7. Electron is the underlying cross-platform framework, whose latest release is 19.x. The current plan is to migrate to Electron 18 in the June 2022 release next month, which should provide a fix. Impatient developers can get it earlier via the VS Code Insiders release, which previews new features.

Microsoft also noted continuing work on development containers, containers designed to be used for developing, debugging and testing code rather than for deployment. Recent features include a command-line interface for building and starting a container from a devcontainer.json specification, and add-ons for GitHub Actions and Azure DevOps tasks to run a development container as part of continuous integration. Using containers for development is nothing new, but the effort to standardise the way they are specified and to provide conformant tools is worth watching. Containerised development can easily be switched from local to remote hosts and back, and the popularity of this approach seems sure to increase.