Welcome to the July 2021 version of Visual Studio Code. We hope you will enjoy the many updates and improvements in this version, here are some of the highlights:
- extended view -Rich extended detailed information hovering, new running status tab page.
- Setting Editor Verification -Quickly find editing errors in object settings.
- Drag and drop terminal -Move the terminal across windows to the editor and panel areas.
- extended theme customization -customize multiple color themes at once.
- Built-in support for Jupyter notebook -directly open the .ipynb file in VS Code.
- notebook UI improvements -display the first row of collapsed cells, undo/redo of each cell.
- The final determination of the -Native support for running tests using the test explorer in VS Code.
- Debug disassembly view preview -Display the disassembled C++ code in VS Code.
- real-time preview extension -real-time HTML preview in VS Code, support JavaScript debugging.
- remote-container devcontainer CLI -a command line interface for developing containers.
If you want to read these release notes online, please visit update on .
For more information about VS Code, please visit the Microsoft MS Learn platform: http://aka.ms/vscodelearn
internal early version : Do you want to experience the new features first? You can download the nightly Insiders and try it out immediately when the latest update is available.
Workbench
Extension
Improved the expanded view after resizing. In the animation below, you can see that the expanded view with the default width displays all the detailed information (icons, ratings, and install counts were not previously displayed). When it is reduced, a smaller expansion icon will be displayed, and when its width is further reduced, the icon and rating will be hidden.
The expanded view will now display custom hover information. This rich hover includes a complete description of the extension and other useful information, such as why the extension is disabled or recommended.
You can now see more plug-in running status in the plug-in panel, such as its activation time, whether it is activated at startup, and whether any warnings or errors are generated runtime status . Of course, you can also hover over the plug-in view to see part of the running status information.
The details tab of the plug-in panel will now display category information, resource links, and other information such as plug-in release time and update time. Selecting a category will display all plugins in the current category.
Settings editor
The settings editor now supports object verification. The validation will cover type errors that may be introduced when directly editing the JSON file.
In non-editing mode, the array setting now has drag and drop support.
In addition, uniqueItems property to true now only displays the remaining options instead of all the options in the drop-down list.
The settings editor now also supports multi-line string settings, where the value is presented in a multi-line text area instead of a single-line input box:
Extended theme customization syntax
The color customization setting allows users to customize the color of the current theme:
- workbench.colorCustomizations
- editor.tokenColorCustomizations
- editor.semanticTokenColorCustomizations
The following syntax can be used to customize the colors of multiple themes at once:
"workbench.colorCustomizations": {
"[Abyss][Red]": {
"activityBar.background": "#ff0000"
},
"[Monokai*]": {
"activityBar.background": "#ff0000"
}
},
You can list multiple topics, or use *
wildcards at the beginning or end of the name to select multiple topics.
Jupyter notebook file support
This month, we *.ipynb
the code supporting the 061114a027e262 file from the Jupyter notebook plug-in into a built-in plug-in. This means that you can now get native support for Jupyter notebooks in a freshly installed VS Code environment. You don't even need to install Jupyter plugins. It should be noted that if you want to execute ipywidgets or other complex rendering type code units or view the running results, you still need to fully install the Jupyter plug-in.
Improvements to the notebook layout
We have made some improvements to the notebook layout in this iteration:
- We will now render the first line of the code unit when folding.
- When the window width is not large enough to present all the main operations, the operations on the toolbar of the notebook editor will move to the overflow area.
notebook.undoRedoPerCell
default value is now changed totrue
.
We have also updated the default style of code cells to display background colors to help distinguish cells. The theme can use notebook.cellEditorBackground customize this color.
Finally, you can now use the notebook.globalToolbarShowLabel
setting to switch text labels on the notebook toolbar:
"Copy relative path" configure path separator
When calling the "copy relative path" operation, the new setting explorer.copyRelativePathSeparator allows the use of path separators to be explicitly set. The following options are available:
Auto
(default)-use operating system specific path separator/
-use slash as path separator\\
-Use backslashes as path separators
Share view state across editor groups
A new setting workbench.editor.sharedViewState
to configure how the editor view state (for example, the scroll position in the editor) is shared between editor groups.
By default, this setting is disabled to keep the current setting. If you open the editor sideways and then close the editor group later, just to open the editor sideways again, the view state will not be restored because you are opening a new editor group. However, when you enable this setting, unless a more specific view state is found for the editor group, the latest editor view state will be retained and used in all editor groups.
editor
Switch between different folding ranges
The following new commands can set the cursor position to the corresponding fold:
- Go to the next fold (
editor.gotoNextFold
) - Go to the previous fold (
editor.gotoPreviousFold
) - Go to the parent fold (
editor.gotoParentFold
)
There are currently no default key bindings for these commands, but you can add your own keyboard shortcuts in the following ways:
Preferences: Open keyboard shortcut ( kb(workbench.action.openGlobalKeybindings)
)
Import statements are automatically folded
Import statements are automatically folded by setting editor.foldingImportsByDefault
When the file is opened, the folded state will be saved.
TypeScript, JavaScript, Java, C#, C++ and other programming languages with folding scope providers all support this new feature. Note: The foldable range provider specifically refers to the FoldingRangeKind.Imports
whose Import statement is marked as 061114a027e57a.
Seed search string for selection
The Find Widget setting editor.find.seedSearchStringFromSelection
already supports seeding search strings from non-empty selections. By default, when the widget is displayed, the editor will use the following two as search keywords:
- options.
- Select the surrounding words.
Inline suggested improvements
We changed the presentation of inline suggestions. This not only fixes many bugs, but also makes the word wrap recognize inline suggestions.
In addition, multi-line inline suggestions for non-trailing positions are now supported.
Improvements to embedded hints
We also changed the presentation of embedded prompts. By using the same mechanism as inline suggestions, embedded hints are now also used for word wrap.
This mechanism also implements a separate cursor docking around the embedded prompt.
terminal
Drag the terminal between windows
Now, you can arbitrarily drag the terminal from the tab page or the editing area of a window to the tab page, the editing area, or the panel of another window.
Child process tracking and shutdown warning
When the user tries to close a terminal with child processes, terminal.integrated.confirmOnExit
and the new setting terminal.integrated.confirmOnKill
will warn the user. By default, this only affects the terminal in the editor area, but the user can configure it to display all terminal warnings (in the panel area).
Set the provided terminal configuration file as default
Now users can set the terminal configuration file provided by the plug-in as the default configuration file.
Underline and strikethrough support
The terminal now supports underline and strikethrough attributes. For example, it can be configured Git to use these new properties:
The above example uses the following .gitconfig
parameters:
[color "status"]
added = green bold
changed = red bold strike
untracked = cyan
branch = yellow black bold ul
Editing area to create a terminal
Now, the user can use the new command workbench.action.createTerminalEditorSide
in the active editing area to create a new terminal on the side.
Active terminal tab indicator
Themes can now use the theme key terminal.tab.activeBorder
set the color of the vertical line to indicate the active terminal tab.
terminal.tab.activeBorder
is not set, the color will tab.activeBorder
back to 061114a027e7f7.
Disable animated icons on terminal tabs
terminal.integrated.tabs.enableAnimation
will disable animated icons on terminal tabs. If it is for the task rather than the spinner, the play button will be used:
debugging
Improved the play/debug button in the title area of the editor
In February edition , we introduce a drop-down button to the center of the editor's header area (compact) position to run and debug commands are grouped. According to some user feedback, we try to improve the drop-down button by remembering the last operation performed. The drop-down button will now have two click areas, one for the default action (left) and the other for the drop-down (right), where the selected run operation will be memorized and saved as the new default value.
caution:
- If there is only one run or debug operation, the drop-down menu will be omitted.
- If there are multiple running or debugging operations, all operations will appear in the drop-down menu, and the default operation is set to the first operation in the drop-down menu (provided that there is no memorized operation).
- When VS Code restarts, it will retain the default operation for the specific workspace; its will be reserved for the editor content.
Contributions to extensions
Real-time preview
real-time preview extension has some exciting new features this month! This includes:
- External preview of built-in JavaScript debugger compatibility.
- Please use
Live Preview: Show Debug Preview
to try it out! - Improvements to the embedded browser, such as "find in the page" support and quick access to
webvivew
DevTools. - File system monitoring automatically generates files.
- Looking forward to more!
To see more detailed information about this month's progress, please refer to the extended release notes .
GitHub pull requests and issues
GitHub Pull Requests and Issues extension, which allows you to respond to, create, and manage pull requests and issues. This month’s focus has been extended to the question’s "getting started", allowing you to deal with issues outside of the currently open repositories.
To learn about all the new features and updates that you can view complete change log for version 0.29.0 extension .
Jupyter
Jupyter extension plug-in work continues. To learn about all the new features and updates, you can view July version of the full update log .
Interactive window
The Jupyter interactive window provides another way to build and use Jupyter notebooks, using text files instead of the notebook interface. Last month, we previewed the upgraded version of the Jupyter interactive window, and now we provide a deeper workbench integration, including support for themes, custom key bindings, fragments, compatibility with extensions, etc.! Thank you very much to our users for providing feedback on the preview version via GitHub issues. The built-in interactive window has now become the default interface in version 1.59. The previous interface "jupyter.enableNativeInteractiveWindow": false
and will be deleted in the upcoming version. We look forward to your feedback !
Run line by line
We have been working to support the "run line by line" feature in Jupyter notebooks. This feature is essentially a simplified debugging mode that allows you to execute unit code line by line without any complicated debugging UI. This is still experimental, you can set "jupyter.experimental.debugging": true
, ipykernel installation of version 6 in the kernel of your choice, then select "Cell toolbar running row " button to look at early adopters.
Remote container devcontainer CLI
remote-container extension is suitable for using Docker containers in VS Code. It now includes the devcontainer command line interface, allowing you to easily open the folder in the container ( devcontainer open ) or build the development container image ( devcontainer build ).
You can learn about new features and bug fixes remote development
Preview function
Automatic language detection for untitled files
We are happy to announce the initial preview version of automatic language detection for untitled files, which uses machine learning to detect the language you are encoding and automatically set the language mode for untitled files. This feature uses the open source ML library Tensorflow.js and the GitHub user @yoeo from the ML model of Guesslang
In this version, this feature will be turned off by default, but we plan to set it as the default setting for the next iteration. If you want to enable it, please apply the following settings:
"workbench.editor.untitled.experimentalLanguageDetection": true
For example, you can open an untitled file and paste a piece of code into your editor.
The following is a snippet of automatically recognized Python code:
In addition, you can view the language being detected by opening the language selector.
Note: If the language test result is not confident enough, you will keep the current language mode, and no results will be displayed in the language selector until the language test result is more confident.
This setting also allows you to provide language overrides, which can be used to specify language modes that you do not want to automatically turn off.
The following example shows how to turn off automatic detection of .md files:
"workbench.editor.untitled.experimentalLanguageDetection": true
"[markdown]": { "workbench.editor.untitled.experimentalLanguageDetection": false }
When you edit an untitled Markdown file, the automatic language detection function will not run on However, if you are modifying any other types of untitled files, the automatic language detection function will will detect the contents of these files.
We have separated and merged the code that interacts with the ML model into its own code base and released it as an npm package, which exists in the vscode-languagedetection repository.
Please let us know if the automatic language detection function of untitled files has helped your daily work!
TypeScript 4.4
This version includes support for TypeScript version 4.4. You can read more about the new language features and improvements in TypeScript 4.4 TypeScript blog Some tool highlights:
- Embed parameter name and type hints in JavaScript and TypeScript files.
- Basic spelling suggestions in pure JS files. These will only be displayed when we are sure of the error and fix.
To start using the TypeScript 4.4 beta version, please install TypeScript Nightly extension .
If you encounter any errors while using TypeScript 4.4, please share your feedback and let us know.
Disassembly view
Thank Microsoft C ++ team contributed a lot of code , we are pleased at this milestone release includes disassembly view preview function.
The disassembly view can be opened from the context menu of the editor to display the disassembled source code of the active stack frame. It supports single-step execution of assembly instructions, and breakpoints can be set on a single instruction.
The disassembly view is only available in an active debugging session. Note that the underlying debugging extension plug-in also needs corresponding support.
Currently, only C++ and Mock Debug can support disassembly view.
From a technical point of view, the disassembly view of VS Code implements four other functions of the DAP (Debug Adapter Protocol) protocol:
disassembly
request to provide disassembly source code based on memory location.instructionPointerReference
attribute on the stack frame.granularity
attribute of the step request.- Instruction breakpoint and
setInstructionBreakpoints
request.
Extended creation
Test API
Last fall, we started adding native support for running tests in VS Code. This month, the first set of test-related APIs has been delivered. Compared with the previous extension plug-ins, these APIs provide greater flexibility, better performance, and a richer user experience. Check out the guide to writing test extensions to learn more.
Existing users of the test resource manager UI plug-in can get a native experience testExplorer.useNativeTesting
to true
However, the conversion is based on the test explorer UI to extend the existing API, so some features such as rich differences are not included.
the Java extension package included in the Microsoft the Java test runner is the first test in one of the extended API.
Contribution points of the new file menu
Extensions that help create new file editors (such as notebooks or custom editors) can now contribute points file/new file This menu can be accessed from the welcome page or the "New File..." item in the file menu.
Rich status bar hover
Status bar items now support rich hovering, including links and icons StatusBarItem.tooltip: string | IMarkdownString
- If
MarkdownString.supportThemeIcons
set totrue
, you can use the icon$(iconName)
- If
MarkdownString
is trusted, you can also add a command link. Syntax:([test](command:vscode.newWindow))
Status bar warning color
The status bar items that indicate warnings can use the newly added colors statusBarItem.warningBackground
and statusBarItem.warningForeground
.
Object settings without additionalProperties
The object setting must set additionalProperties
to false
to support the object in the setting editor. Otherwise, the settings editor will interpret as complex settings (irregular settings) and direct the user to the settings JSON file.
Multi-line string settings
To add support for multi-line string settings in the settings editor, please add "editPresentation": "multilineText"
as a key-value pair to the string settings. Changing the string setting to a multi-line setting will cause the setting editor to display the setting value in a multi-line text area instead of a single-line input box.
Updated Codicons
We have added the following new icons to the codicon library:
azure
compass-active
compass-active
compass-dot
compass
debug-all
debug-coverage
git-pull-request-closed
git-pull-request-draft
issue-draft
layers-active
layers-dot
layers
Reason for text document change
When the event workspace.onDidChangeTextDocument
is triggered, the new attribute reason
event object will inform the user that the reason for the text change is the undo or redo operation.
Language Server Protocol
language server protocol and the corresponding npm module have been released. 3.17 version contains a new proposal for the detailed information of the finished item label, which is in line with the latest changes in VS Code itself.
Debug adapter protocol
Finalize "writeMemory" request and "memory" event proposal
writeMemory
request has been completed and can now be used in Debug Adapter Protocol and the corresponding npm module. If the debug adapter has the supportsWriteMemoryRequest
, the client can use writeMemory
request to write bytes to the memory at a given location.
memory
event has a new proposal , will add a milestone to the next DAP.
Proposed extension API
Each milestone version comes with new proposed APIs, and extension authors can try them out. We look forward to your feedback. If you want to try the proposed new API, please complete the following steps:
- You must use the Insiders version because the proposed API is frequently modified.
- You must add this line to
package.json
"enableProposedApi": true
. - Copy the latest version of the vscode.proposed.d.ts file to the source location of the project.
You will not be able to publish extensions using the recommended API. Because the new version may have major changes, we need to ensure that the existing extension plug-ins can continue to be used.
isDefault for TaskGroup
group
attribute exists on tasks.json
file and is also exposed through the task API. group
attribute has a isDefault
attribute, which is not available in the API until now. The proposal isDefault
attribute as TaskGroup
, so that the extension can read which task is the default task of the group, but cannot override the user configuration by setting a default value for the group.
ForceRecreate for AuthenticationGetSessionOptions
getSession
API used to obtain authentication session objects has never been able to require users to log in again. However, this is necessary for authentication services such as GitHub that use the SAML/Single Sign-On (SSO) experience, where the access token will eventually lose access to the resource when the SSO session expires. The proposal is AuthenticationGetSessionOptions
added another named forceRecreate
property to allow you to require users to log in again. Show the user a mode experience createIfNone
project
Iframe-based webviews are now visible everywhere on the desktop
This month we completed the transition from Electron to the webview based on the ordinary <iframe>
element. This better coordinated the cross-desktop and web implementation of VS Code's webviews, and also allowed us to delete a lot of redundant code now.
Electron 13 update
In this milestone version, we completed the experiment of bundling Electron 13 into VS Code, thanks to all participants who participated in the Insiders test and self-hosting. This is the main Electron version that comes with Chromium 91.0.4472.124. The Node.js version of this version has not changed, it is still v14.16.0.
Electron sandbox support progress
As we prepare for the VS Code workbench to enable Electron's sandbox function, we hope to enable the hybrid sandbox mode on Linux and not bundle the cli parameter --no-sandbox
in the distributed package deb, rpm, snap, and tar archives. Chromium has a multi-layer sandbox model linux. If Chromium can not namespace sandbox for Tier 1, it will try to help the program chrome-sandbox
use setuid sandbox . For a setuid binary to work, it needs to meet the following conditions:
- The sandbox binary file must be executable by the Chromium process.
- It must be SUID and can be executed by others.
We can keep these conditions for deb and rpm packages. Currently unable to obtain these permissions for snap, we have the following tracking issue https://github.com/microsoft/vscode/issues/127140.
As for other applications that use tar archives, if the application cannot use the namespace sandbox (which may happen when running in a container) it will fail with the following error:
FATAL:setuid\_sandbox\_host.cc(158)]
The SUID Sandbox Assistant binary file was found, but it is not configured correctly. Instead of running without a sandbox, I am now suspending the program. You need to make sure that chrome-sandbox is owned by the root user and the mode is 4755.
If this happens, you can use one of the following two options to make it work:
Fix setuid helper permission issue
sudo chown root <path-to-vscode>/chrome-sandbox sudo chmod 4755 <path-to-vscode>/chrome-sandbox
--no-sandbox
flag 061114a027f62b
Some improvements to the smoke test
We have been running a complete set of smoke tests for each build. We test to open VSCode (desktop and web) and execute a bunch of UI elements to ensure correct functionality. In this milestone version, we invested more resources on this basis, allowing us to remove manual smoke testing from the final plan.
The smoke test can now be run on all platforms (macOS, Linux, and Windows). The most important thing is that we have realized that the smoke test is automatically run every time the code is submitted, so that we can find software errors that may be introduced by the new version of VS Code in time.
Finally, thanks to our Playwright library for automating Web smoke testing. We use their tracking tool , which allows us to view and repeat failed smoke tests.
Learning materials
Major repair
- 26425 : The "Open Changes" button should not be displayed when there are no changes
- 100815 : The external terminal is interrupted when connecting to the remote WSL
- 106981 : When the window zoom is set to -1, the terminal cursor is ghosted
- 127959 : The debug pane will open when the debugger is paused
- 129059 : The object widget in the setting editor does not show descriptions
- 129070 : Cannot correct the drop-down list setting value by just pressing the "OK" button
- 129415 : Cannot run user tasks in single file mode
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。