For instructions on installing the Dart or Flutter extensions, go here.
v3.11.0 2020-05-29
Preview: Update Imports on Rename
- #548/#1740: A new setting (
dart.previewUpdateImportsOnRename
) has been added to enable automatically updatingimport
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!).
Improved Custom CodeLens for Tests and Main Functions
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.
- #2459/#2466: A single launch configuration can now contribute multiple CodeLens links using
codeLens.for
. - #2458: A launch configuration can now specify that CodeLens links should only be shown within a sub-folder using
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:
Global Expression Evaluation
- #906/#1062: Expression evaluation in the Debug Console now works when not paused at a breakpoint/exception.
Evaluation is not currently scoped to the file/class you have open in the editor.
Commands
- #2436/#2437: DevTools and other pub package updates are now correctly detected if they only vary by build metadata (
+xyz
), as described in Pub’s versioning scheme. - #2430/#2432: If DevTools fails to launch, the error notification now includes a button to try re-activating the package.
- #2414/#2418:
pub
andflutter
commands will no longer show.bat
suffixes in the output window on Windows.
Debugger
- #2428/#2469: When setting breakpoints in locations that will not be hit (for example in the Dart SDK when
dart.debugSdkLibraries
is set tofalse
) a warning will be shown offering to change debug settings. - #2424/#2467: It’s now possible to attach to processes using a
--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 apreLaunchTask
. - #2471: When starting a debug session, the VM Service URL is now printed to the Debug Console.
- #2448: Conditional breakpoints with expressions that evaluate to numerics now work for web apps.
- #2423: When using a new enough Dart SDK (v2.9.0 onwards) it’s now possible to debug internal Dart libraries, such as
dart:http
.
Editor
- #2468: Code completion now shows full documentation instead of only a summary.
- #2426: Flutter Icons are now shown in the gutter when running in LSP mode.
- #2425: Flutter UI Guides are now shown in the editor (if enabled) when running in LSP mode.
Flutter
- #2453: For web apps, the Chrome device will now be picked over the Web-server device by default.
Testing
- #2417: The test tree now shows test durations of the last run alongside the name.
Misc
- #2422/#2427: More of the work to find project roots at startup is now async, reducing the chance of triggering “Extension causes high CPU” warnings in VS Code.
- #2476/#2481:
pub get
will no longer automatically run when saving apubspec.yaml
file in a Bazel workspace.
Upstream Issues
Some feature requests and fixes require new features and fixes in upstream projects like VS Code and LSP which use counts of 👍s on those issues to help gauge demand. The Dart-Code website now lists some of the most significant upstream issues with a description of the feature/fix they would enable. Please consider reviewing this list and adding your 👍 to any GitHub issues relevant to features you’d like to see!