Visual Studio Code June 2020 update (version 1.47)

栏目: IT技术 · 发布时间: 4年前

内容简介:Downloads: Windows:User System |Mac | Linux:snapWelcome to the June 2020 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:If you'd like to read these release notes o

June 2020 (version 1.47)

Downloads: Windows:User System |Mac | Linux:snap deb rpm tarball

Welcome to the June 2020 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:

  • Accessibility improvements - New screen reader capabilities.
  • New JavaScript debugger - Debug in the terminal, profiling support.
  • Source Control unified view - All repositories displayed in a single view.
  • View and sort pending changes - View files as a tree or list, sort by name, path, or status.
  • Edit complex settings - Edit object settings from the Settings editor.
  • New HexEditor extension - Edit files in hexadecimal format from within VS Code.
  • Remote Development tutorials - Learn to develop over SSH, inside Containers, and in WSL.
  • Java Pack Installer for macOS - Get set up to develop in Java with VS Code on macOS.

If you'd like to read these release notes online, go toUpdates on code.visualstudio.com .

Insiders:Want to try new features as soon as possible? You can download the nightlyInsiders build and try the latest updates as soon as they are available. And for the latest Visual Studio Code news, updates, and content, follow us on Twitter @code !

Accessibility

This milestone, we again received helpful feedback from our community, which helped us identify and tackle many accessibility issues . Highlights:

  • Compact folders in the File Explorer now properly narrate expanded/collapsed state and the ARIA level.
  • Screen readers can now update the cursor offset in the editor. As a result, the screen reader "Say All" command should work better when stopped and resumed.
  • Same ARIA live messages will now properly be re-read by the screen reader.

Workbench

Edit object settings from the Settings editor

Before, the Settings editor could only be used to edit the settings of primitive types, like strings and booleans, and you needed to edit settings.json directly for more complicated settings types. Now, you can edit non-nested object settings from the Settings editor. Extension authors can use this functionality to increase the visibility of these kinds of settings.

Before

In the Settings editor:

Visual Studio Code June 2020 update (version 1.47)

And in settings.json :

Visual Studio Code June 2020 update (version 1.47)

After

In the Settings editor:

Visual Studio Code June 2020 update (version 1.47)

Select and keep focus in a list view

There is a new command, list.selectAndPreserveFocus , which lets you select an item from a list, while keeping focus in that list. This can be helpful if you want to select multiple files from a list, such as the File Explorer, without having focus go to the file editor.

The command is not bound to any keyboard shortcut by default, but you can add your own keybinding:

{
  "key": "ctrl+o",
  "command": "list.selectAndPreserveFocus"
}

Stable Windows ARM builds

VS Code for Windows on ARM is now available for the stable release! :tada:

Install VSIX through drag and drop

VS Code now supports installing an extension VSIX file through drag and drop onto the Extensions view.

New Search editor command arguments

There are two new arguments added to the Search editor commands ( search.action.openNewEditor , search.action.openNewEditorToSide ) to allow keybindings to configure how a new Search editor should behave:

triggerSearch
focusResults

For example, the following keybinding runs the search when the Search editor is opened but leaves the focus in the search query control.

{
  "key": "ctrl+o",
  "command": "search.action.openNewEditor",
  "args": { "query": "VS Code", "triggerSearch": true, "focusResults": false }
}

New Search editor context default

The search.searchEditor.defaultNumberOfContextLines setting has been updated to have a default value of 1 instead of 0, meaning one context line will be shown before and after each result line in the Search editor. To go back to the old behavior, set the value back to 0.

List/Tree: Dynamic horizontal scrolling

The previously existing workbench.list.horizontalScrolling setting can now be toggled at runtime without forcing you to reload the workbench.

Editor

Case changing in regex replace

VS Code now supports changing the case of regex matching groups while doing a find/replace in the editor. This is done with the modifiers \u\U\l\L , where \u and \l will upper/lowercase a single character, and \U and \L will upper/lowercase the rest of the matching group.

Example:

Visual Studio Code June 2020 update (version 1.47)

The modifiers can also be stacked - for example, \u\u\u$1 will uppercase the first three characters of the group, or \l\U$1 will lowercase the first character, and uppercase the rest.

Currently, these are only supported in the editor's Find control, and not in global Find in Files .

Debugging

New JavaScript Debugger

Our new JavaScript debugger, after being the default debugger on Insiders last month, is now the default debugger for JavaScript (Node.js and Chrome) in VS Code. If you skipped the "Preview Features" section of the last few VS Code changelogs, you can catch up on the what's new section of the debugger README.

You should not need to change any settings or launch configurations to take advantage of the new debugger. If you run into any problems, please open an issue !

Single file debugging

Until today, the VS Code debugger had no standard way of showing that a file in the editor could be easily debugged with just a click of a button. Some debug extensions would allow you to do so, usually with a debug configuration that prompted you to "Debug file in editor." However, users still had to select the correct configuration in the debug configuration dropdown menu before they can use F5 . Other debug extensions implement a fallback strategy for F5 : if no launch.json exists, F5 will try to debug the file currently open in the active editor.

Since both approaches are not easily discoverable, some debug extensions (for example, Python) have started to add a Run button to the editor's title area.

Since we haven't found a better approach, and this method can be implemented without any need for new APIs, we wrote some guidelines for how to implement it in a standard way. Extension authors can find these guidelines below in the "Extension Authoring" section.

Users need only to remember these icons:

Visual Studio Code June 2020 update (version 1.47)

If one or both show up on the left-hand side of the editor's title area, then running or debugging the file in the editor is just one click away.

Less cluttered CALL STACK view

We've started to make the CALL STACK less crowded for common cases: the CALL STACK view now supports hiding debug session nodes that exist for technical reasons, but do not provide much value to users.

The first debug extension that has opted into this feature is the new JavaScript debugger, which could eliminate a parent debug session whenever there is only a single child session.

Visual Studio Code June 2020 update (version 1.47)

We hope that other debug extensions will follow. Please see the new proposed API below.

New command aliasSet Next StatementforJump to Cursor

To make the command Jump to Cursor more discoverable for users coming from Visual Studio, we've added the command alias Set Next Statement .

If you don't know what Jump to Cursor does: it lets you move program execution to a new location without executing any of the source code in between.

Breakpoint Path on Hover

When hovering over a source breakpoint in the BREAKPOINTS view, VS Code now shows the absolute path of the breakpoint.

Tasks

pnpm package manager support

pnpm is now a valid choice for the npm.packageManager setting, along with npm and yarn , to run your scripts.

Source Control

Single view

The Source Control view has been consolidated into a single view:

Visual Studio Code June 2020 update (version 1.47)

All repositories are rendered in a single view, so you can get a better overview of the entire workspace status. Additionally, the Source Control view can now be moved to the panel and other views can be moved to the Source Control view container.

View and Sort

We have added support for sorting your changes in the source control view by name, path (default), and state when using the list view option. We have consolidated the view options (list vs. tree) and sort options into a new View & Sort menu item in the context menu.

Visual Studio Code June 2020 update (version 1.47)

Git: Restore squash message

Similar to usual git merge command, the SCM view will now restore the SCM input with the default message if the user is in the middle of a git merge --squash command.

Languages

TypeScript 3.9.6

VS Code now bundles TypeScript 3.9.6. This minor update fixes a few bugs, including one that could cause the TypeScript server to crash on certain source code patterns.

Browser support

Large file upload support

You can now upload large files and folders to the web version of VS Code and progress will be reported accurately so that you can track the number of bytes that have been uploaded, as well as the upload speed.

Visual Studio Code June 2020 update (version 1.47)

Towards text file encoding support

During this milestone, a lot of work went into full support for text encodings in the browser for reading and writing files. We rely on two libraries that are now supported in browsers by leveraging webpack:

This work will continue in July and should be generally available soon.

Preview features

Preview features are not ready for release but are functional enough to use. We welcome your early feedback while they are under development.

Settings Sync

We have been working the last couple of months to support synchronizing VS Code preferences across machines and this feature is available for preview on theInsiders release.

You can now disable sync on other machine using Turn off Preferences Sync context menu action on the machine entry in Synced Machines view.

Visual Studio Code June 2020 update (version 1.47)

We've also improved progress information when turning on sync.

TypeScript 4.0 support

This iteration, we've continued improving our support for TypeScript 4.0 . Some highlights include:

  • Highlight calls to deprecated symbols in the editor with strikethrough

    Visual Studio Code June 2020 update (version 1.47)

  • Explain reasons why a given refactoring cannot be applied

    Visual Studio Code June 2020 update (version 1.47)

  • Improved auto imports- Read more in the TypeScript 4.0 blog post .

You can try out these features today by installing the TypeScript nightly extension .

Partial IntelliSense support while large JavaScript or TypeScript projects are loading

The TypeScript 4.0 beta also brings a new feature that should help reduce the time you spend waiting while a large JavaScript or TypeScript project is being loading. To explain how this works, we first need to cover a little background on how current versions of TypeScript work.

When you open a JavaScript or TypeScript file in VS Code, the TypeScript language service determines which project that file belongs to and then loads the associated project for it. Sometimes this project can be quite large, such as with the core VS Code codebase, which consists of many thousands of TypeScript files. While a project is being loaded, VS Code able to handle basic syntax operations, such as getting the document outline and enabling code folding, but it cannot currently provide IntelliSense or other more advanced language features because they depend on understanding the entire project. In order to provide auto imports, for example, the TypeScript language service needs to know all exported symbols in a project.

The changes in TypeScript 4.0 make it possible for VS Code provide IntelliSense and other more advanced language features while a large project is still loading. The caveat is that the IntelliSense we can provide is limited to consulting the current file instead of the entire project. This means that features such as suggestions and Go to Definition will work, but we will only show suggestions from the current file and you can only run Go to Definition to jump to another symbol in the current file.

If you work with large JavaScript and TypeScript projects, we are interested in hearing your feedback on this new feature. You can try it today using the TypeScript nightly extension . Our hope is that it allows you to start work with your code almost instantly until the more complete, project-wide IntelliSense becomes available.

Undo/Redo for Code Action

We are working on being able to undo and redo Code Actions and refactorings. A prominent example is the Java class rename refactoring, which makes a textual change as well as renaming the file on disk. This can now be undone but it still requires triggering undo two times. Stay tuned as we further improve this and please provide early feedback.

Contributions to extensions

Notebooks

The VS Code team is continuing on native support for Notebooks. To help with development, we've created a GitHub Issue Notebooks extension, which lets you search GitHub issues and pull requests. This extension is still in preview and requires using VS CodeInsiders, but it lets experience Notebooks first hand and we welcome your feedback.

Updated UX

We've updated the visual look of Notebook cells for a more compact design. We've also added shadow outlines to selected cells to make the selection state more obvious.

Visual Studio Code June 2020 update (version 1.47)

Notebook Hot Exit support

We have added Hot Exit support in Notebooks to allow extensions to handle backups and restoration. Your unsaved local changes can now be serialized by extensions and restored when the workspace is reopened.

Undo/Redo enhancement

We added support for extensions to contribute to the Undo/Redo stacks. Extensions can now control what operations are undoable. For example, in a GitHub Issue Notebook, you can select the Lock button to make the cell content readonly, and also undo/redo this operation through the normal Undo/Redo commands.

Visual Studio Code June 2020 update (version 1.47)

Theme:GitHub Theme

Create Untitled Notebook

We extended the New File command ( ⌘N (Windows, Linux Ctrl+N ) ) to support creating new untitled Notebook files. For example, you can use the keybinding below to quickly create a GitHub Issue Notebook and run queries.

{
  "key": "cmd+i",
  "command": "workbench.action.files.newUntitledFile",
  "args": { "viewType": "github-issues" }
}

Visual Studio Code June 2020 update (version 1.47)

Theme:GitHub Theme

Notebook color tokens

We've also added the following color tokens for Notebooks:

notebook.cellBorderColor
notebook.cellHoverBackground
notebook.cellInsertionIndicator
notebook.focusedCellBackground
notebook.focusedCellBorder
notebook.focusedCellShadow
notebook.focusedEditorBorder

Two new samples show how to support debugging in Notebooks

Notebook extension guide

If you're interested in creating Notebook extensions for VS Code, there is a new guide detailing theNotebook API. You'll learn about the API as well as the details of the VS Code Notebook infrastructure and Notebook extension development best practices.

Remote Development

Work continues on the Remote Development extensions , which allow you to use a container, remote machine, or the Windows Subsystem for Linux (WSL) as a full-featured development environment.

Feature highlights in 1.47 include:

  • Remote - SSH: Remote server can listen on a socket instead of a port.
  • Remote - Containers: Prompt to open repository in a volume.
  • Remote - Containers and WSL: Check out the recent Using Remote Containers in WSL 2 blog post.

You can learn about new extension features and bug fixes in the Remote Development release notes .

If you are new to VS Code Remote Development, you can get started with these introductory tutorials:

Azure Account

The newest version of the Azure Account extension now exposes a credentials object that can be used with the latest Azure SDK .

GitHub Pull Requests and Issues

Work continues on the GitHub Pull Requests and Issues extension, which allows you to work on, create, and manage pull requests and issues. Some updates for this release include:

  • Markdown hovers in the Issues view.
  • Label suggestions in the new issue editor.
  • Hover support for issues formatted as GH-123.

To learn about all the new features and updates, you can see the full changelog for the 0.18.0 release of the extension.

Hex Editor

TheHexEditor extension continues to be improved upon to provide a native hexadecimal editing experience within VS Code. The major updates to the extension this release include simple editing support (allowing users to undo, redo, edit existing hex cells, and add new cells to the end of the document) and large file optimization allowing users to open files above 18 megabytes, which previously wasn't possible.

Visual Studio Code June 2020 update (version 1.47)

A full list of notable changes can be found in the README . Any feedback or issues experienced can be filed against the vscode-hexeditor repository .

Extension authoring

AccessibilityInformation

We have finalized the AccessibilityInformation in the TreeItem , StatusBarItem , and TimelineItem elements to support screen readers. AccessibilityInformation contains a label and a role . The label is read out by a screen reader once the item has focus. role of the item defines how a screen reader interacts with it. The role should be set in special cases when, for example, a tree-like element behaves like a checkbox. If role is not specified, VS Code will pick the appropriate role automatically.

Fallback message for "go to location"

The editor.action.goToLocations command can now show a fallback message when no locations could be found. This allows extensions to implement features like Go to Super Type that behave just like built-in features, for example Go to Definition . The snippet below is a full sample of an extension invoking this command:

vscode.commands.executeCommand(
  'editor.action.goToLocations',
  vscode.window.activeTextEditor.document.uri, //anchor uri and position
  vscode.window.activeTextEditor.selection.start,
  [], // results (vscode.Location[])
  'goto', // mode
  'No Super Types Found' // <- message
);

Guidelines for improving the single file debug experience

For debug extensions that want to improve the single file debug experience by adding a "Run" and/or "Debug" button to the editor, we recommend following these guidelines for a consistent look and feel:

  • Contribute Run and/or Debug commands in the package.json (see Mock Debug ):
    • Use the command titles "Run File"/"Debug File" or "Run Python File"/"Debug Python File".
    • Use the $(play) icon for Run and $(debug-alt-small) for Debug.
  • Add the commands to the editor title area ( see Mock Debug ):
    • To make the commands only visible for specific languages use a "when" clause, for example, "resourceLangId == python" .
    • Put the Run command in the 1_run@10 group and the Debug command in the 1_run@20 group.

CodeActionProviderMetadata.documentation

The new documentation property on CodeActionProviderMetadata lets extension provide static documentation for the code actions they return. This documentation is shown at the bottom of the list of code actions when the provide returns a code action:

Visual Studio Code June 2020 update (version 1.47)

A command is executed when the user selects the documentation entry. This command can show the documentation in the editor or open it in a browser.

Open and Save dialog title

The API for providing a title for Open and Save file dialogs via the OpenDialogOptions and SaveDialogOptions has been finalized. Note that not all operating systems allow this title to be set, so the behavior may differ depending on where your extension is running.

New extension categories

You can now use following newly added categories to categorize your extensions.

  • Data Science
  • Machine Learning
  • Visualization
  • Testing
  • Notebooks

Secondary button style

We've introduced a secondary button style to be used when needing to make a button less prominent:

button.secondaryForeground
button.secondaryBackground
button.secondaryHoverBackground

GitHub Workflow badges

You can now add GitHub Workflow badges to the list of badges of a published extension, since github.com was added to the list of Approved Badge sources .

Visual Studio Code June 2020 update (version 1.47)

Enabling Proposed API through argv.json

The field enable-proposed-api is now supported in argv.json . This allows extension authors to run their proposed API extension in released builds for long-term dogfooding, without needing to open VS Code via the command line and pass the --enable-proposed-api CLI flag.

New codicon icons

We've added the following new icons to ourcodicon library:

debug-alt-small
vm-connect

Visual Studio Code June 2020 update (version 1.47)

Language Server Protocol

Support for semantic tokens and lazy resolving of additional text edits in completion items has been added to the upcoming 3.16 specification.

Proposed extension APIs

Every 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 must use Insiders because proposed APIs change frequently.
  • You must have this line in the package.json file of your extension: "enableProposedApi": true .
  • Copy the latest version of the vscode.proposed.d.ts file into your project's source location.

Note that 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.

Terminal link provider

Building on top of the terminal's new link system added in the previous release , this new proposal window.registerLinkProvider allows an extension to attach links to the terminal, including a tooltip label that is displayed on hover.

Visual Studio Code June 2020 update (version 1.47)

This contrasts with the previously proposed (now deprecated)"link handler" API, which would allow your extension to possibly handle the link in question, and if it doesn't, there would be a fallback chain. This new model where links will definitely be handled fits in better with the vision in mind where links could have a list of possible actions.

New API for Run without Debugging

VS Code's "Run without Debugging" feature is a variant of debugging where an existing debug configuration is reused for running a program instead of debugging it. A consequence of this run mode is that the program does not break into the debugger, neither for hitting breakpoints nor for any other reason.

In this milestone we provide official extension API for "Run without Debugging": a new property noDebug has been added to the DebugSessionOptions of the debug.startDebugging function. noDebug controls whether the session about to start should run with or without debugging. When the noDebug property is missing, the value from the parent session (if there is one) is used. If there is no parent session, the value 'false' is assumed for a missing noDebug property.

Please note: Previously it was possible to add a noDebug flag to a launch configuration to achieve the same effect. This unofficial API is now deprecated (but still supported) and we suggest that extensions transition to the new API.

New API for reducing clutter in the CALLSTACK view

With the arrival of sophisticated debug extensions and debug setups, more debug sessions show up in the CALL STACK tree view and make them look crowded. In most cases the debug sessions are useful to users and they need to have full control over them. In other cases some debug sessions are just implementation artifacts or a grouping mechanism for a set of child sessions.

In order to make the CALL STACK view less crowed in common cases, we have introduced a feature to hide a parent debug session node if it only has a single child session. This feature is called "compact mode" and is available through a new optional compact property on the DebugSessionOptions of the debug.startDebugging function.

If compact is true, the parent of the newly created debug session will be hidden in the CALL STACK view as long as it only has a single child. If compact is false or missing, the parent node stays visible (which is the current behavior).

Markdown hovers in trees

There is new proposed API that allows the tooltip of a TreeItem to be a MarkdownString . In addition to allowing Markdown for the tooltip, there is also a new resolveTreeItem on the TreeDataProvider . The idea behind resolveTreeItem is that properties that might take longer to calculate (currently only the tooltip ) can be resolved later, instead of calculated up front for every tree item. You can see resolveTreeItem and the Markdown tooltip in use in the GitHub Pull Requests and Issues extension .

Engineering

Using TypeScript 4.0 to build VS Code

VS Code is now built using anightly build of TypeScript 4.0.

This new TypeScript version helped us catch a few potential bugs around accessors and also helps us test the upcoming TypeScript release.

Documentation and extensions

CMake Tools for C++

New tutorial for developing C++ applications with CMake and theCMake Tools extension.

Visual Studio Code June 2020 update (version 1.47)

Java Pack installer for macOS

The Visual Studio Code for Java Pack Installer downloads the necessary dependencies and extensions for Java development in Visual Studio Code on macOS.

Notable fixes

  • 71291 : Horizontal scroll breaks rendering in tree
  • 93230 : Local variables are collapsed in annoying ways
  • 98309 : Support multiple files in working copy file service
  • 99061 : Allow to reopen closed diff editors
  • 99290 : Git: Restore diff editors on reload
  • 99704 : Top debug session row says "paused" when not paused
  • 99786 : Unable to start additional session when Debug Tool Bar Location docked
  • 100524 : SCM Decorations missing
  • 101132 : Release notes can never be opened after you try to open them when offline

Thank you

Last but certainly not least, a big Thank You to the following people who contributed this month to VS Code:

Contributions to our issue tracking:

Contributions to vscode :

Contributions to vscode-extension-samples :

Contributions to vscode-eslint :

Contributions to debug-adapter-protocol :

Contributions to language-server-protocol :

Contributions to vscode-languageserver-node :

Contributions to vscode-css-languageservice :

Contributions to node-jsonc-parser :

Contributions to vscode-generator-code :


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Web Services原理与研发实践

Web Services原理与研发实践

顾宁刘家茂柴晓路 / 机械工业出版社 / 2006-1 / 33.00元

本书以web services技术原理为主线,详细解释、分析包括XML、XML Schema、SOAP、WSDL、UDDI等在内在的web Services核心技术。在分析、阐述技术原理的同时,结合作者在Web Services领域的最新研究成果,使用大量的实例帮助读者深刻理解技术的设计思路与原则。全书共有9章,第1章主要介绍web Services的背景知识;第2-7章着重讲解webServic......一起来看看 《Web Services原理与研发实践》 这本书的介绍吧!

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具