Hey all,
v3.11.0 of the Dart/Flutter extensions for VS Code are live. Release notes are below (and online).
dart.previewUpdateImportsOnRename
) has been added to enable automatically updating import
statements when files are moved/renamed.This feature currently only works for files (not folders) and only a single file at a time (please add thumbs up to this VS Code issue!).
Improvements have been made to custom CodeLens for launch configurations. The existing template
field on launch configurations has been deprecated and replaced with a new codeLens
field.
codeLens.for
.codeLens.path
.For example, to add CodeLens for a launch config that sets a RELEASE_MODE=true
environment variable to tests in test/integration_tests
:
{
"name": "Current File (release mode)",
"type": "dart",
"request": "launch",
"codeLens": {
// Types of CodeLens to inject
"for": [ "run-test", "run-test-file", "debug-test", "debug-test-file" ],
// Restrict to certain folders
"path": "test/integration_tests",
// Text for CodeLens link (${debugType} will be replaced with "run" or "debug")
"title": "${debugType} (release)"
},
"env": { "RELEASE_MODE": true }
}
This will insert additional CodeLens links into tests, groups and main functions:
Evaluation is not currently scoped to the file/class you have open in the editor.
+xyz
), as described in Pub’s versioning scheme.pub
and flutter
commands will no longer show .bat
suffixes in the output window on Windows.dart.debugSdkLibraries
is set to false
) a warning will be shown offering to change debug settings.--write-service-info
file. This allows running arbitrary commands to spawn Dart processes that Dart-Code does not support (as long as they can use --write-service-info
) and attach to them in a single step using a launch configuration with a preLaunchTask
.dart:http
.