May 2021 (version 1.57)
Join VS Code at Microsoft Ignite or catch the sessions online. A year of VS Code, wrapped. Explore the highlights. May 2021 (version 1.57) Update 1.57.1 : The update addresses these issues . The Workspace Trust feature addresses CVE-2021-34529 . Downloads for 1.57.1 Windows x64 Arm64 macOS Universal Intel Apple silicon Linux .deb .rpm .tar.gz Arm instructions Snap Welcome to the May 2021 release of Visual Studio Code.
There are a number of updates in this version that we hope you will like, some of the key highlights include: Workspace Trust - Extra security against code execution when browsing unfamiliar source code. New Getting Started experience - Helps you quickly set up and learn about VS Code. Remote Repositories - Browse and edit code without locally cloning repositories. Terminal tabs - Tabs let you easily create, manage, and group multiple open terminals.
Edge browser debugging - Integrates the Microsoft Edge Developer Tools directly into VS Code. JSDoc @link support - Add @link tags in your comments for fast symbol navigation. Go to Definition for non-code files - Quickly jump to images and stylesheets. Notebook API finalized - Notebook API for native notebook support in VS Code. VS Code at Build 2021 blog post - Catch up with on-demand sessions featuring VS Code. If you'd like to read these release notes online, go to Updates on code.visualstudio.com .
Watch a highlight of the new features in this version in the VS Code team's release party. You can find the recording of the event on our YouTube channel. Insiders: Want to try new features as soon as possible? You can download the nightly Insiders build and try the latest updates as soon as they are available. Workbench Workspace Trust Visual Studio Code takes security seriously and wants to help you safely browse and edit code no matter the source or authors.
The Workspace Trust feature lets you decide whether your project folders should allow or restrict automatic code execution. Note : When in doubt, leave a folder in Restricted Mode . You can always enable trust later. Safe code browsing It's great that there is so much source code available on public repositories and file shares. No matter the coding task or problem, there is probably already a good solution available somewhere.
However, using open-source code and tools does have risks and you can leave yourself open to malicious code execution and exploits. Workspace Trust provides an extra layer of security when working with unfamiliar code by preventing automatic code execution when a workspace is open in Restricted Mode . Note : If you want to disable the Workspace Trust feature, you can set security.workspace.trust.enabled to false . Only disable Workspace Trust if you are confident that you know the source and integrity of the files you are working with.
Restricted Mode When prompted by the Workspace Trust dialog, if you choose No, I don't trust the authors , VS Code will go into Restricted Mode to prevent code execution. The workbench will display a banner at the top with links to Manage your folder via the Workspace Trust editor and Learn More taking you to the Workspace Trust user guide. You will also see a Restricted Mode badge in the Status bar. Restricted Mode tries to prevent automatic code execution by disabling or limiting the operation of several VS Code features: tasks, debugging, workspace settings, and extensions.
To see the full list of features disabled in Restricted Mode, you can open the Workspace Trust editor via the Manage link in the banner or by clicking the Restricted Mode badge in the Status bar. Trusting a workspace If you trust the authors and maintainers of a project, you can trust the project's folder on your local machine. For example, it is usually safe to trust repositories from well-known GitHub organizations such as github.com/microsoft or github.com/docker.
The initial Workspace Trust prompt when you open a new folder allows you to trust that folder and its subfolders. You can also bring up the Workspace Editor and quickly toggle a folder's trusted state. There are several ways to bring up the Workspace Editor dialog. When in Restricted Mode: Restricted Mode banner Manage link Restricted Mode Status bar item You can also at any time use: Workspaces: Manage Workspace Trust command from the Command Palette ( ⇧⌘P (Windows, Linux Ctrl+Shift+P ) ) Manage Workspace Trust from the Manage gear in the Activity bar Selecting folders When you trust a folder, it is added to the Trusted Folders & Workspaces list displayed in the Workspace Trust editor.
You can manually add, edit, and remove folders from this list and the active folder enabling trust is highlighted in bold. You also have the option to trust the parent folder. This will apply trust to the parent folder and all subfolders. This can be helpful if you have many folders with trusted content collocated under one folder. Enabling extensions What happens if you want to use Restricted Mode but your favorite extension doesn't support Workspace Trust?
This can happen if an extension, while useful and functional, isn't being actively maintained and hasn't declared their Workspace Trust support. To handle this scenario, you can override the extension's trust state with the extensions.supportUntrustedWorkspaces setting. Note : Be careful overriding an extension's Workspace Trust support. It may be that the extension author has a good reason for disabling their extension in Restricted Mode.
Below you can see the user settings.json entry for the Prettier extension. "extensions.supportUntrustedWorkspaces" : { "esbenp.prettier-vscode" : { "supported" : true , "version" : "6.4.0" }, }, You can either enable or disable Workspace Trust support with the supported attribute. The version attribute specifies the exact extension version applicable and you can remove the version field if you want to set the state for all versions.
If you'd like to learn more about how extension authors evaluate and determine which features to limit in Restricted Mode, you can read the Workspace Trust Extension Guide . Settings Below are the available Workspace Trust settings: security.workspace.trust.enabled - Enable Workspace Trust feature. Default is true. security.workspace.trust.startupPrompt - Whether to show the Workspace Trust dialog on startup. Default is to only show once per distinct folder or workspace. security.workspace.trust.emptyWindow - Whether to always trust an empty window (no open folder).
Default is true. security.workspace.trust.untrustedFiles - Controls how to handle loose files in a workspace. Default is to prompt. extensions.supportUntrustedWorkspaces - Override extension Workspace Trust declarations. Either true or false. To learn more about Workspace Trust, you can read the Workspace Trust user guide. New Getting Started experience Over the past couple iterations, we have been working on refreshing the welcome page for VS Code, and we're happy to announce that starting this iteration our new welcome page ( Getting Started ) is enabled by default for all users.
In this new experience, both the core of VS Code and installed extensions can contribute "walkthroughs" to the welcome page, which are designed to help you get started in either VS Code itself or with a new extension. For example, the Luna Paint extension contributes a Walkthrough with guides to help understand each component of the image editor. Additionally, once you've completed (or dismissed) all walkthroughs, VS Code rearranges the contents to double the number of recent workspaces accessible with one click.
Settings workbench.startupEditor - Controls the default editor to show on startup. The new value gettingStarted replaces the old default welcome . Some of the other available options include readme , gettingStartedInEmptyWorkbench , newUntitledFile , or none . workbench.welcomePage.walkthroughs.openOnInstall - Whether to automatically open extension-contributed walkthroughs upon install. Th
The rest of this page is on the live site.