Brain  Crist

Brain Crist

1595396940

Visual Studio Code June 2020

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:

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

Join us live at the VS Code team’s livestream on Monday, July 13 at 9am Pacific (5pm 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. 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:

Object setting in the old Settings editor

And in settings.json:

Object setting in the JSON editor

After

In the Settings editor:

Object setting in the new Settings editor

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! 🎉

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.openNewEditorsearch.action.openNewEditorToSide) to allow keybindings to configure how a new Search editor should behave:

  • triggerSearch - Whether a search be automatically run when a Search editor is opened. Default is true.
  • focusResults - Whether to put focus in the results of a search or the query input. Default is true.

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:

Changing case while doing find and replace

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:

Run and debug action in editor title

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.

Screenshot of two "Call Stack" views. Without compaction, there is an extra child session between the parent session and each attached worker processes.

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

New command alias Set Next Statement for Jump 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:

Source Control with a single view

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.

View & Sort in Source Control

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.

Web upload indicator in bottom Status bar

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:

  • [iconv-lite](https://github.com/ashtuchkin/iconv-lite) to read and write encodings
  • [jschardet](https://github.com/aadsm/jschardet): to guess encodings from textual content

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 the Insiders 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.

Turn off preferences sync for a machine

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
  • Call to a deprecated function rendered in the editor
  • Explain reasons why a given refactoring cannot be applied
  • Displaying the reason a refactoring cannot be applied

#visual studio code #visual studio #java #coding #javascript

What is GEEK

Buddha Community

Visual Studio Code June 2020
Brain  Crist

Brain Crist

1594753020

Citrix Bugs Allow Unauthenticated Code Injection, Data Theft

Multiple vulnerabilities in the Citrix Application Delivery Controller (ADC) and Gateway would allow code injection, information disclosure and denial of service, the networking vendor announced Tuesday. Four of the bugs are exploitable by an unauthenticated, remote attacker.

The Citrix products (formerly known as NetScaler ADC and Gateway) are used for application-aware traffic management and secure remote access, respectively, and are installed in at least 80,000 companies in 158 countries, according to a December assessment from Positive Technologies.

Other flaws announced Tuesday also affect Citrix SD-WAN WANOP appliances, models 4000-WO, 4100-WO, 5000-WO and 5100-WO.

Attacks on the management interface of the products could result in system compromise by an unauthenticated user on the management network; or system compromise through cross-site scripting (XSS). Attackers could also create a download link for the device which, if downloaded and then executed by an unauthenticated user on the management network, could result in the compromise of a local computer.

“Customers who have configured their systems in accordance with Citrix recommendations [i.e., to have this interface separated from the network and protected by a firewall] have significantly reduced their risk from attacks to the management interface,” according to the vendor.

Threat actors could also mount attacks on Virtual IPs (VIPs). VIPs, among other things, are used to provide users with a unique IP address for communicating with network resources for applications that do not allow multiple connections or users from the same IP address.

The VIP attacks include denial of service against either the Gateway or Authentication virtual servers by an unauthenticated user; or remote port scanning of the internal network by an authenticated Citrix Gateway user.

“Attackers can only discern whether a TLS connection is possible with the port and cannot communicate further with the end devices,” according to the critical Citrix advisory. “Customers who have not enabled either the Gateway or Authentication virtual servers are not at risk from attacks that are applicable to those servers. Other virtual servers e.g. load balancing and content switching virtual servers are not affected by these issues.”

A final vulnerability has been found in Citrix Gateway Plug-in for Linux that would allow a local logged-on user of a Linux system with that plug-in installed to elevate their privileges to an administrator account on that computer, the company said.

#vulnerabilities #adc #citrix #code injection #critical advisory #cve-2020-8187 #cve-2020-8190 #cve-2020-8191 #cve-2020-8193 #cve-2020-8194 #cve-2020-8195 #cve-2020-8196 #cve-2020-8197 #cve-2020-8198 #cve-2020-8199 #denial of service #gateway #information disclosure #patches #security advisory #security bugs

Brain  Crist

Brain Crist

1595396940

Visual Studio Code June 2020

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:

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

Join us live at the VS Code team’s livestream on Monday, July 13 at 9am Pacific (5pm 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. 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:

Object setting in the old Settings editor

And in settings.json:

Object setting in the JSON editor

After

In the Settings editor:

Object setting in the new Settings editor

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! 🎉

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.openNewEditorsearch.action.openNewEditorToSide) to allow keybindings to configure how a new Search editor should behave:

  • triggerSearch - Whether a search be automatically run when a Search editor is opened. Default is true.
  • focusResults - Whether to put focus in the results of a search or the query input. Default is true.

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:

Changing case while doing find and replace

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:

Run and debug action in editor title

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.

Screenshot of two "Call Stack" views. Without compaction, there is an extra child session between the parent session and each attached worker processes.

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

New command alias Set Next Statement for Jump 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:

Source Control with a single view

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.

View & Sort in Source Control

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.

Web upload indicator in bottom Status bar

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:

  • [iconv-lite](https://github.com/ashtuchkin/iconv-lite) to read and write encodings
  • [jschardet](https://github.com/aadsm/jschardet): to guess encodings from textual content

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 the Insiders 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.

Turn off preferences sync for a machine

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
  • Call to a deprecated function rendered in the editor
  • Explain reasons why a given refactoring cannot be applied
  • Displaying the reason a refactoring cannot be applied

#visual studio code #visual studio #java #coding #javascript

COMO USAR e trabalhar com Code Review no Visual Studio Code

Não é todo programador que gosta de compartilhar o seu trabalho ou até mesmo receber feedbacks de como o seu código foi escrito, mas o Code Review é cada vez mais comum em empresas do mundo todo.

Conheça uma extensão para Visual Studio Code e comece a trabalhar com Code Review em seu próximo projeto. Essa é a sua chance de saber COMO USAR e trabalhar com Code Review no Visual Studio Code.

#visual studio code #code review #visual studio #code

Vincent Lab

Vincent Lab

1605176310

My Visual Studio Code Extensions (2020 Edition)

In this video, I’ll be showing you all of my Visual Studio extensions

#vs code #visual studio code #visual studio extensions #rainbow csv #vscode extensions 2020

Brain  Crist

Brain Crist

1596975120

Writing Visual Studio Extensions with Mads - Episode 1: Item Templates

Join Mads Kristensen from the Visual Studio team each week as he builds extensions for Visual Studio live!

#visual studio code #visual studio #code #microsoft #visual studio extensions