Bị lỗi there is no external editor select
Welcome to the July 2021 release of Visual Studio Code. There are many updates in this version that we hope you will like, some of the key highlights include: Show
Join us live at the VS Code team's livestream on Tuesday, August 10 at 8am Pacific (4pm London) to see a demo of what's new in this release, and ask us questions live. 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. WorkbenchExtensionsImproved Extensions view on resize. In the following short video, the Extensions view with default width shows all details (previously the icon, ratings, and install count were not shown). As the view shrinks, a smaller extension icon is shown, and when its width reduces further, the icon and ratings are hidden. Theme: GitHub Light Theme The Extensions view now shows a custom hover on an extension. This rich hover includes the complete description of the extension and other useful information such as why an extension is disabled or recommended. Theme: GitHub Light Theme You can now check the runtime status of an extension in the new Runtime Status tab in the extension pane. Status information includes its activation time, whether it is activated on startup, and if it has any warnings or errors. Some of this information is displayed in the Extensions view and its hover (shown in the image above). Theme: GitHub Light Theme The Extension pane Details tab now shows categories, resources links, and other information such as the extension release and update dates. Selecting a category will display other extensions in that category in the Extensions view. Theme: GitHub Light Theme Settings editorThe Settings editor now supports validation on objects. The validation checks for type errors that can be introduced when editing the JSON file directly. Array settings now have drag and drop support in non-editing mode. Moreover, enum array settings with the property The Settings editor also now supports multiline string settings, where the value is rendered in a multiline text area instead of a single-line input box: Extended theme customization syntaxThe color customization settings listed below allow users to customize colors of the current theme:
There is new syntax to customize multiple themes at once:
Multiple themes can be listed as well as the
2 wildcard character can be used at the beginning and the end of the name. Support for Jupyter NotebooksThis month, we moved the code that handles reading
3 files from the Jupyter Notebook extension into a new built-in extension. This means that you can now open Jupyter notebooks in a clean install of VS Code, without having to install the full Jupyter extension. However, if you want to execute cells or view outputs that use ipywidgets or other complex renderer types, you will have to install the Jupyter extension. Notebook layout improvementsWe have made a few improvements to the notebook layout this iteration:
We also updated the default styles for code cells and now show a background color to help distinguish cells apart. Themes can use
6 to customize this color. Lastly, you can now toggle the text labels on the notebook toolbar using the setting
7: Configure the path separator for Copy Relative PathA new setting
8 allows you to explicitly set the path separator when invoking the Copy Relate Path action. The available separator options are:
A new setting
2 was added to configure how editor view state (for example, the scroll position in the editor) is shared across editor groups. By default, this setting is disabled to preserve the current behavior. If you open an editor to the side and close that editor group later, only to open the editor again to the side, no view state is restored because you are opening a new editor group. However, when you enable this setting, the most recent editor view state is preserved across all editor groups and will be used, unless more specific view state is found for the editor group. Below the selection state is preserved when reopening the
3 file to the side. EditorNavigate between folding regionsThere are new commands to set the cursor location to a corresponding fold:
The commands currently have no default keybindings but you can add you own keyboard shortcuts via Preferences: Open Keyboard Shortcuts (⌘K ⌘S (Windows, Linux Ctrl+K Ctrl+S)). Automatically fold importsUse the setting
7 to have import statements automatically folded. The fold state is stored once a file has been opened once. The feature works with TypeScript, JavaScript, Java, C#, C++, and with all languages that have a folding range provider that annotates import statements with
8. Seed search string from selectionThe Find control setting
9 has been extended to support seeding the search string only from non-empty selection. By default, the editor will use the selection or the word around the empty selection as the search keyboard when the Find control is revealed. Inline suggestions improvementsWe have changed the way inline suggestions are rendered. This not only fixes a lot of bugs, but also makes word wrapping aware of inline suggestions. In addition, multi-line inline suggestions at non-trailing positions are now supported. Inlay hints improvementsWe have also changed the way inlay hints are rendered. By using the same mechanism as for inline suggestions, inlay hints are now also taken into account for word wrapping. This mechanism also enables separate cursor stops around inlay hints. TerminalDrag and drop terminals across windowsDrag and drop terminals from the tabs list or editor area of one window into the tabs list, editor area, or panel of another window. Child process tracking and close warningsThe existing
0 and new
1 settings use child process tracking to display a warning when trying to close a terminal that has child processes under the shell process. By default, this tracking only affects terminals in the editor area but can now be configured to show warnings for all terminals or those in the panel area. Set contributed terminal profile as defaultTerminal profiles contributed by extensions can now be set as the default profile. The default terminal profile is indicated by the Default suffix in the terminal dropdown. Underline and strikethrough supportThe integrated terminal now supports underline and strikethrough attributes. For example, to use these new attributes: Theme: Sapphire Theme The above example uses the following settings in
2:
Create terminal in editor area to the sideThere is a new command
3 to create a terminal in the editor area to the side of the active editor. Active terminal tab indicatorThemes can now set the color for a vertical line to indicate the active terminal tab using theme key
4. The color will fall back to
5 if
4 is not set. Disable animation in terminal tab iconThe new setting
7 will disable animation in the terminal tab icon. For tasks, the play button is used, instead of a spinner animation: DebuggingImproved Run/Debug button in editor titleIn the February release, we introduced a dropdown button to group the Run and Debug commands in a central (and compact) location in the editor's title area (refer to the ). Based on user feedback, we've tried to improve the dropdown button by remembering the last executed action. The dropdown button now has two click zones, one for the default action (left) and another for the dropdown (right) which, when selected, runs the action and remembers it as the new default. The dropdown behavior:
Contributions to extensionsLive PreviewThe Live Preview extension, , has some exciting new features. These include:
To see more details on this month's progress, see the extension's release notes. Theme: GitHub Dark Theme GitHub Pull Requests and IssuesWork continues on the GitHub Pull Requests and Issues extension, which allows you to work on, create, and manage pull requests and issues. One of this month's highlights is that Start working on an issue has been expanded to let you work on issues outside of your current repository. To learn about all the new features and updates, you can see the full release of the extension. JupyterWork continues on the Jupyter extension. To learn about all the new features and updates, you can read the full release of the extension. If you'd like to know more about VS Code's path to enabling native support for notebooks, you can read the recent Coming of Age of Notebooks blog post. Interactive window The Jupyter Interactive window provides an alternative way to build and work with Jupyter notebooks, using a text file instead of a notebook interface. Last month, we previewed an upgraded version of the Jupyter Interactive window, featuring deeper workbench integration including support for themes, custom keybindings, snippets, compatibility with extensions, and more. Many thanks to our users for providing feedback via GitHub issues on the preview experience. The built-in Interactive window is now the default interface in 1.59. The previous interface will remain available behind the setting
9 and will be removed in an upcoming release. We look forward to your feedback. Run By Line We've been working on supporting the "Run By Line" feature in Jupyter notebooks. This feature is essentially a simplified debug mode that lets you step through your cell's code line by line without any complex debug UI. This is still experimental, but you can try it out by setting
0, installing version 6 of ipykernel in your selected kernel, then selecting the Run By Line button in the cell toolbar. PythonIn the Python extension, we've improved the sorting of the list of Python interpreters. In the past, virtual environments would be displayed at the bottom of the list, resulting in a lot of scrolling and/or searching. Virtual environments located on the project root are now displayed first, followed by globally installed environments. Dev Containers devcontainer CLIThe Dev Containers extension, for working with Docker containers from within VS Code, now includes a
1 command line interface to let you open a folder within a dev container (
3). You can learn about new Remote Development extension features and bug fixes in the Remote Development release notes. Preview FeaturesAutomatic language detection of untitled filesWe're excited to announce the initial preview of automatic language detection of untitled files that uses machine learning to detect which language you are coding in and automatically sets the language mode of the untitled file. This feature uses the open-source ML library, Tensorflow.js, and the ML model from Guesslang by GitHub user @yoeo. In this release, this feature will be off by default but we plan on making it the default next iteration. To enable it, apply the following setting:
To see the feature in action, open an untitled file (File > New File) and paste source code into your editor. Here's an example of autodetection of Python code: Theme: Panda Theme Additionally, you can see what language(s) are being detected by opening the language picker. Theme: Panda Theme Note: If language detection isn't confident enough, then you will stay in your current language mode and no results will show in the language picker until language detection has more confidence. The setting also allows you to provide language overrides to specify language modes you don't want to be automatically switched away from. Here's an example to not autodetect Markdown files:
With the settings above, automatic language detection will not run while you are editing an untitled Markdown file. However, if you modify an untitled file of any other kind, automatic language detection will run with the contents of those files. We've separated the code that interacts with the ML model into its own library, released as an npm package, in the vscode-languagedetection repo. Let us know how automatic language detection for untitled files works for you! TypeScript 4.4This release includes support for the upcoming TypeScript 4.4 release. You can read more about the new language features and improvements in TypeScript 4.4 on the TypeScript blog. Some tooling highlights:
To start using the TypeScript 4.4 nightly builds, install the TypeScript Nightly extension. Please share your feedback and let us know if you run into any bugs with TypeScript 4.4. Disassembly viewThanks to a large contribution by the Microsoft C++ team, we are happy to include a preview of a debug Disassembly view in this milestone. The Disassembly view can be opened from an editor's context menu to show the disassembled source of the active stack frame, and it supports stepping through assembly instructions and setting breakpoints on individual instructions. The Disassembly view is only available in an active debug session and when the underlying debug extension supports it. As of today only the Microsoft C++ and Mock Debug extensions can feed the Disassembly view. From a technical perspective, VS Code's implementation of the Disassembly view now supports four more features of the Debug Adapter Protocol:
Testing APIsLast fall we began work on adding native support for running tests in VS Code, and this month the first set of testing-related APIs has been finalized. These APIs provide greater flexibility, better performance, and richer UX over what has been found previously in extensions. Check out the guide on writing testing extensions to dive in. Theme: codesong Existing users of the Test Explorer UI extension can get the native experience by setting
8 to One of the first extensions to adopt the testing API was the Microsoft Test Runner for Java included in the Extension Pack for Java. Extensions that provide a way to create a new file editor, for instance notebooks or custom editors, can now contribute commands to the new
0 menu contribution point. This menu can be accessed from the New File... item on the Welcome page or in the File menu. Rich Status bar hoverRich hovers including links and icons are now supported on Status bar items
1.
Status bar warning colorsStatus bar items that represent warnings can use the newly added colors
6 and
7. Object settings without additionalPropertiesObject settings must have
8 set to
9 for an object to be supported in the Settings editor. Otherwise, the Settings editor will interpret the setting as a complex setting that can take on any shape, and direct the user to the settings JSON file. Multiline string settingsTo add support for a multiline string setting in the Settings editor, add `.ipynb`0 as a key-value pair to the string setting. Changing a string setting to be multiline will cause the Settings editor to render the setting value in a multiline text area instead of a single-line input box. Updated codiconsWe've added the following new icons to our codicon library:
Text Document change reasonWhen the event `uniqueItems`4 is fired, a new property `uniqueItems`5 on the event object indicates whether the text change was caused by an Undo or Redo operation. Language Server ProtocolA new next version of the Language Server Protocol, together with the corresponding npm modules, has been published. The 3.17 version contains a proposal for the completion item label details that is in line with the latest changes in VS Code itself. Debug Adapter ProtocolFinalized "writeMemory" request and "memory" event proposalThe `uniqueItems`6 request has been finalized and is now available in version 1.48 of the Debug Adapter Protocol and the corresponding npm modules. If a debug adapter has a `uniqueItems`7 capability, clients can use the `uniqueItems`6 request to write bytes to memory at a given location. The `uniqueItems`9 event has a that will be added to DAP in the next milestone. Proposed extension APIsEvery milestone comes with new proposed APIs and extension authors can try them out. As always, we want your feedback. This is what you have to do to try out a proposed API:
You cannot publish an extension that uses a proposed API. There may be breaking changes in the next release and we never want to break existing extensions. isDefault for TaskGroupThe `true`2 property exists on tasks defined in a `true`3 file and is also exposed through the tasks API. The `true`2 property has an `true`5 property, which until now has not been available in the API. This proposal exposes the `true`5 property as readonly on the `true`7, so that extensions can read which task is the default for a group, but cannot override a user's configuration by setting the default for a group. forceRecreate for AuthenticationGetSessionOptionsUntil now, the `true`8 API, which is used to get an authentication session object, never had the ability to ask the user to log in. Prompting a login is needed for authentication services like GitHub, that use SAML/Single Sign On (SSO) with an access token that eventually looses access to resources when an SSO session expires. This proposal adds another property to `true`9 called `workbench.colorCustomizations`0 that allows you to ask the user to sign in again. A modal experience similar to when you specify `workbench.colorCustomizations`1 is shown to the user. Engineeringiframe based webviews now used everywhere on desktopThis month we finished our transition from Electron's webview tag element to normal `workbench.colorCustomizations`2 element based webviews. This better aligns the implementation of VS Code's webviews across desktop and web, and also lets us delete a lot of now-redundant code. Electron 13 updateIn this milestone, we finished the exploration to bundle Electron 13 into VS Code and we want to thank everyone involved with testing and self-hosting on Insiders. This is a major Electron release and comes with Chromium 91.0.4472.124. There is no change to the Node.js version with this release and it will remain v14.16.0. Progress for Electron sandbox supportAs we continue to make the VS Code workbench ready for enabling Electron's sandbox, we wanted to enable mixed sandbox mode on Linux and no longer bundle with the CLI argument `workbench.colorCustomizations`3 in our distributed packages deb, rpm, snap and tar archive. Chromium has a multi-layer sandboxing model on Linux. If Chromium cannot use the namespace sandbox for layer-1, it will try to use the setuid sandbox via the helper binary `workbench.colorCustomizations`4 shipped alongside the application binary. For the setuid binary to work, it needs to meet the following conditions:
We were able to preserve these conditions for deb and rpm packages. It is currently not possible to achieve these permissions for snap, and we have tracking issue 127140 to address snap packages moving forward.As for using the tar archive, if the application cannot use the namespace sandbox, which might the case when running inside containers, it will fail with the following error:
If that happens, you can use either of the following two options to get it working:
Smoke test improvementsWe run a suite of smoke tests, triggered on each build, that launch VS Code (both desktop and web) and exercise various UI elements to ensure proper functionality. This milestone we invested in this infrastructure to allow us to remove manual smoke testing from our release checklist. The smoke tests now run on all platforms (macOS, Linux, and Windows). On top of that, one of our more involved smoke test suites that specifically checks for regressions between the last Stable version of VS Code and the new release, has been automated to run on each commit. Finally, thanks to the awesome Playwright library, which we use for automated web smoke testing, we enabled their tracing capabilities to allow us to replay failing smoke tests using their trace viewer tool. Notable fixes
Thank youLast but certainly not least, a big Thank You to the following people who contributed this month to VS Code: |