Visual Studio Code is een opensourcecode-editor met ondersteuning voor IntelliSense, debugging, Git en code snippets. Ondersteuning voor de gangbare script- en programmeertalen is aanwezig en het kan daarnaast via extensies uitgebreid worden. Microsoft heeft versie 1.34 uitgebracht en hierin zijn de volgende veranderingen en verbeteringen aangebracht:
Editor
Stable CodeLensVS Code now optimistically caches CodeLens locations and restores them immediately after switching editors. This fixes an issue where CodeLens lines would shift slightly when switching between editors.
Languages
Lower rank for CSS property values with vendor prefixCSS property values prefixed with dash
'-'
(such as-moz-grid
or-ms-grid
), now come aftergrid
in auto completion.Debugging
debug.showSubSessionsInToolBarWe have introduced the setting
debug.showSubSessionsInToolBar
which controls whether the debug sub-sessions are shown in the debug tool bar. When this setting is false, the stop command on a sub-session will also stop the parent session. This setting default is false.Tasks
Terminate all tasksThe Tasks: Terminate Task command has a new option to terminal all tasks if there are multiple tasks running. If this is an action you do often, you can create a keyboard shortcut for the command with the
terminateAll
argument.Automatically show Problems panel
{ "key": "ctrl+k t", "command": "workbench.action.tasks.terminate", "args": "terminateAll" }
The new
revealProblems
task property allows you to automatically show the Problems panel. The property values arealways
,never
, andonProblem
.
{ "version": "2.0.0", "tasks": [ { "type": "npm", "script": "watch", "problemMatcher": "$tsc-watch", "isBackground": true, "presentation": { "reveal": "always", "revealProblems": "onProblem" } } ] }
Contributions to extensions
Preview: Remote DevelopmentNote: The Remote Development extensions require Visual Studio Code Insiders.
Visual Studio Code Remote Development allows you to use a container, remote machine, or the Windows Subsystem for Linux (WSL) as a full-featured development environment.
The extensions in the Remote Development extension pack run in the context of the remote workspace while VS Code feels like it does when you run locally.
VeturThe Vetur extension now offers semantic diagnostics, hover information, jump to definition, and find references for the JavaScript expression inside Vue's template interpolation region:
You can read more about this feature in the Vetur documentation.
Other improvements include reduced memory usage and import path completion. You can learn more about them in the Vetur changelog.
Extension authoring
Multi-extension debuggingIn this milestone, we've added support for debugging more than one extension at a time. This is useful if you are developing a set of tightly coupled or interdependent extensions.
Previously this feature was only surfaced via the command-line interface of VS Code, now the argument
--extensionDevelopmentPath
can be specified more than once. Typically--extensionDevelopmentPath
is used in the launch configuration of an extension. When developing more than one extension, we recommend combining the individual extension projects into a multi-folder workspace and create a new launch configuration (stored in the workspace.code-workspace
file) that uses multiple--extensionDevelopmentPath
arguments for the individual extensions.Here is an example workspace
.code-workspace
file with two extensions,hello1
andhello2
, and a single launch configuration for both extensions:
{ "folders": [ { "path": "hello1" }, { "path": "hello2" } ], "launch": { "configurations": [ { "type": "extensionHost", "request": "launch", "name": "Launch Two Extensions", "args": [ "--extensionDevelopmentPath=${workspaceFolder:hello1}", "--extensionDevelopmentPath=${workspaceFolder:hello2}", ], "outFiles": [ "${workspaceFolder:hello1}/out/**/*.js", "${workspaceFolder:hello2}/out/**/*.js" ] } ] } }
Please note that in this release, it is not possible to create a
Command links in notificationspreLaunchTask
that builds both extensions by combining thepreLaunchTask
s of the individual extension projects.It was always possible to include links in notification messages via the syntax
Links in notifications allow for title[link name](http://link)
, but this only worked for links that open in a browser. Now you can also invoke a command from a link with the syntax[link name](command:<command id>)
. The command with the provided identifier will be triggered when the user clicks the link.You can now add a title to links in notifications that will be shown when the user hovers over the link. The syntax is
[link name](link "<the title>")
.Proposed extension APIs
Every milestone comes with new proposed APIs and extension authors can try them out. As always we are keen on 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.Note that you cannot publish an extension that uses a proposed API. We may likely make breaking changes in the next release and we never want to break existing extensions.
vscode.workspace.workspaceFileThere is a new workspace property returning the location of the workspace file. For example:
file:///Users/name/Development/myProject.code-workspace
oruntitled:1555503116870
for a workspace that is untitled and not yet saved.Depending on the workspace that is opened, the value will be:
undefined
when no workspace or a single folder is opened.- The path of the workspace file as
Uri
.If the workspace is untitled, the returned URI will use the
untitled:
scheme.One use of the workspace file location is to call the
vscode.openFolder
command to open the workspace again after it has been closed:
vscode.commands.executeCommand('vscode.openFolder', uriOfWorkspace);
Note: It is not recommended using the
Machine-specific settingsworkspace.workspaceFile
location to write configuration data directly into the file. You can useworkspace.getConfiguration().update()
which will work both when a single folder is opened as well as an untitled or saved workspace.If you have settings that allow users to customize an executable path and if these paths need to be scoped to the machine they are running on, you can now classify such settings as
machine
scoped. Extension authors set thescope
property when contributing to theconfiguration
extension point. Machine-specific settings can only be configured for User settings.
"configuration": { "title": "Git", "properties": { "git.path": { "type": [ "string", "null" ], "markdownDescription": "Path and filename of the git executable.", "default": null, "scope": "machine" }, } }
Engineering
Rewritten filesystem provider for local filesExtensions have been able to provide their own filesystem implementations for custom resources (read more here). However, VS Code's own implementation for local files was not implemented with the same extension APIs. This resulted in subtle differences when dealing with local file resources compared to resources coming from extensions. Over the last two milestones, we rewrote our local file system provider to use the extension APIs for consistency.
New documentation
Python Azure FunctionsThere is a new Deploy Python to Azure Functions tutorial that describes how to create and deploy Python serverless Azure Functions.
Miscellaneous
Language Server Protocol#The Language Server Protocol has proposed support for the following new features:
- Selection ranges: to compute selection ranges for an array of positions. Sent from client to server.
- Call hierarchy: to compute a call hierarchy for a given symbol. Sent from client to server.
- Progress: to initiate progress reporting from the server. Sent from server to client.
The new features are available in the next versions of the
vscode-languageclient
andvscode-languageserver
npm modules.Notable fixes
- 48259: Explorer Respects Trash Capability from FileSystemProvider
- 68276: Call Stack "Paused On Breakpoint" UI not visible for long thread names
- 69603: Terminal window crashes in Mac OS
- 72110: Debug Console render newlines unnecessary
- 71737: Scrolling in debug window is behaving strange
- 71588: Error revealing files in the explorer
- 70492: ‘Report issue’ button on ‘Running extensions’ causes tens of duplicate issues