Dart Code
Dart & Flutter support for Visual Studio Code Discord Chat Follow on Twitter Contribute to Dart Code

All Releases

v3.84.0 2024-03-01

Move Multiple Files/Folders

#4533: With Dart v3.3 / Flutter v3.19 it’s now possible to move multiple files/folders in a single action and have import statements updated automatically.

Flutter

Testing

DevTools

Dart Tooling Daemon

Misc

Features/Fixes Enabled with Future SDKs

The following items depend on changes to the Dart/Flutter SDKs that have not yet been released to stable channels. They may be able to test in the current beta/master channels and will show up in future SDK releases.

v3.82.0 2024-02-01

Editor

DevTools

#4387: The dart.devtoolsLocation setting has been updated to allow specifying different settings for each DevTools page.

Before:

"devToolsLocation": "beside" // "beside" | "external" | "active"

After:

"dart.devToolsLocation": {
	"default": "beside", // A default used for any pages not explicitly configured
	"cpu-profiler": "external" // Open CPU profiler externally always
},

Debugger

Misc

Features/Fixes Enabled with Future SDKs

The following items depend on changes to the Dart/Flutter SDKs that have not yet been released to stable channels. They may be able to test in the current beta/master channels and will show up in future SDK releases.

v3.80.0 2023-12-27

Flutter

Editor

Debugger

Features/Fixes Enabled with Future SDKs

The following items depend on changes to the Dart/Flutter SDKs that have not yet been released to stable channels. They may be able to test in the current beta/master channels and will show up in future SDK releases.

v3.78.2 2023-12-11

#4880: Using “Run” / “Run without Debugging” will now still connect the debugger to the Dart VM Service (but disable breakpoints and pause-on-exception). This restores some functionality that had become unavailable recently in Run mode, such as:

#4876 has been opened to review (and document) the differences between Run/Debug going forwards. If you have an opinion on this difference, please comment!

v3.78.0 2023-11-30

Flutter Sidebar

#4762/#4833 If you’ve upgraded to the recently-released Flutter 3.16 you’ll have access to a new sidebar panel in VS Code when working on Flutter projects:

The panel currently includes:

Code Completion Signatures

#2462: Also when using Flutter 3.16 / Dart 3.2, code completion has been improved to include more detailed signatures for all items instead of only the one currently selected.

Lazy Getters in Debugger

#4234: Setting "dart.evaluateGettersInDebugViews": false will no longer completely hide getters in debug views, but instead provide a clickable button that will evaluate them lazily.

To completely hide getters you can use the new setting "dart.showGettersInDebugViews": false.

Flutter

Editor

DevTools

Debugger

Features/Fixes Enabled with Future SDKs

The following items depend on changes to the Dart/Flutter SDKs that have not yet been released to stable channels. They may be able to test in the current beta/master channels and will show up in future SDK releases.

v3.76.1 2023-11-02

v3.76.0 2023-11-01

Flutter

Editor

Commands

Flutter Sidebar

The Flutter sidebar is currently available when using the latest Flutter beta and will be available in a future stable Flutter release.

Features/Fixes Enabled with Future SDKs

The following items depend on changes to the Dart/Flutter SDKs that have not yet been released to stable channels. Some are already available in the current beta channels though some are currently only available on bleeding-edge builds and will show up in future beta/stable SDK releases.

v3.74.0 2023-10-02

Editor

Debugger

Commands

Testing

Remote

Other

Features/Fixes Enabled with Future SDKs

The following items depend on changes to the Dart/Flutter SDKs that have not yet been released to stable channels. Some are already available in the current beta channels though some are currently only available on bleeding-edge builds and will show up in future beta/stable SDK releases.

v3.72.2 2023-09-06

v3.72.1 2023-09-04

v3.72.0 2023-09-04

Move to File Refactoring

#4518: When using the latest Flutter release (v3.13), the Move to File refactoring is available without setting any experimental flags.

Improved “Flutter: New Project” Template Selection

#4706: Project templates in the Flutter: New Project command have been updated to make it clearer which templates are applications and which are other project types.

Flutter

Testing

Commands

Editor

Features/Fixes Enabled with Future SDKs

The following items depend on changes to the Dart/Flutter SDKs that have not yet been released to stable channels. Many are already available in the current beta channels though some are currently only available on bleeding-edge builds and will show up in future beta/stable SDK releases.

v3.70.0 2023-08-01

Editor

Flutter

Testing

Misc

Features/Fixes Enabled with Future SDKs

The following items depend on changes to the Dart/Flutter SDKs that have not yet been released to stable channels. Many are already available in the current beta channels though some are currently only available on bleeding-edge builds and will show up in future beta/stable SDK releases.

v3.68.1 2023-07-04

v3.68.0 2023-07-03

Automatically Clone Flutter SDK

#4532: When no suitable Flutter SDK is found, the “Download SDK” button will now attempt to use Git to clone an SDK before launching the Download page from the Flutter website. You will be prompted for a location to download the SDK to and the path will automatically be written into the dart.flutterSdkPath setting.

Add Dart/Flutter SDK to PATH Environment Variable

#4604: New commands Add Dart SDK to PATH / Add Flutter SDK to PATH will attempt to add your current SDK to the PATH environment variable automatically. This is currently only supported on Windows, but other platforms will provide a link to additional information. You’ll be prompted for this automatically if you use the Clone Flutter SDK flow noted above.

Editor

Commands

Testing

Features/Fixes Enabled with Future SDKs

The following items depend on changes to the Dart/Flutter SDKs that have not yet been released to stable channels. They will show up automatically after you upgrade to the next (non-hotfix) Dart/Flutter SDK release in future. If you’re using a recent bleeding-edge version, these items should already be available to you and any issues should be reported on GitHub in the usual way.

All of these issues relate to using the new SDK debug adapters that are being gradually rolled out:

v3.66.0 2023-06-01

Editor

Testing

Terminal

Commands

Debugger

Misc

Features/Fixes Enabled with Future SDKs

The following items depend on changes to the Dart/Flutter SDKs that have not yet been released to stable channels. They will show up automatically after you upgrade to the next (non-hotfix) Dart/Flutter SDK release in future. If you’re using a recent bleeding-edge version, these items should already be available to you and any issues should be reported on GitHub in the usual way.

v3.64.0 2023-05-10

Testing Improvements

#4021/#4487: A new setting "dart.testInvocationMode" has been added that allows you to choose how tests are executed from the test runner and CodeLens links.

Previously, tests were always executed using their name by issuing a command like:

dart test test/foo_test.dart --name "my test"

This could fail to run the correct test if groups/tests have dynamic names, unusual characters or similar/duplicated names. Selecting "line" in the new setting will instead (when supported by your version of package:test) run tests using their line number:

dart test "test/foo_test.dart?line=4"

This resolves a number of issues, including:

For now, the default setting remains "name" but you are encouraged to test out "line" and file issues if you find any places where it does not work as expected. In a future release "line" may become the default.

Go to Symbol in Workspace Improvements

#1903: A new setting has been added that allows excluding SDK/package symbols from the Go to Symbol in Workspace (cmd+T) search which can considerably speed up the search for large workspaces.

Experimental Refactors: Move to File

#1831#4159/#4467: A new setting "dart.experimentalRefactors" has been added to allow gathering feedback of new refactors.

The first available refactor (for Dart 3.0 / Flutter 3.10) is “Move to File” that allows moving top level declarations to another (new or existing) file.

Experimental refactors may be incomplete or not produce the correct code in all cases.

“Move to File” Known Issues:

Debugger Format Specifiers and Hex view

#3940/#4365: When using the new SDK debug adapters (enabled for Dart and rolling out for Flutter), you can change the format of numbers in the Variables/Watch window between Hex and Decimal.

Additionally, you can add “format specifiers” to the end of evaluated expressions to affect how they are rendered:

Format specifiers apply to child values so adding ,nq to an expression that evalutes to a List<String> will suppress quotes for each value.

Debugger

Flutter

Other

v3.62.0 2023-04-03

Flutter

Testing

Commands

DevTools

Other

Features/Fixes Enabled with Future SDKs

The following items depend on changes to the Dart/Flutter SDKs that have not yet been released to stable channels. They will show up automatically after you upgrade to the next (non-hotfix) Dart/Flutter SDK release in future. If you’re using a recent bleeding-edge version, these items should already be available to you and any issues should be reported on GitHub in the usual way.

v3.60.1 2023-03-01

v3.60.0 2023-03-01

Flutter

Terminal

Testing

Debugger

DevTools

Other

Features/Fixes Enabled with Future SDKs

The following items depend on changes to the Dart/Flutter SDKs that have not yet been released to stable channels. They will show up automatically after you upgrade to the next (non-hotfix) Dart/Flutter SDK release in future. If you’re using a recent bleeding-edge version, these items should already be available to you and any issues should be reported on GitHub in the usual way.

v3.58.0 2023-01-25

Inlay Hints for Types and Parameter Names

#4154/#3609/#4156: Inlay hints are now available for types and parameter names. Hints will be shown while holding down Ctrl+Alt (or Ctrl+Option on macOS).

Hovering over an Inlay Hint will show the same hover information as if the hint had been written in the document.

You can change the behaviour with the editor.inlayHints.enabled setting for Dart:

"[dart]": {
	// 'off' - never show
	// 'on' - always show
	// 'offUnlessPressed' - show only while shortcut keys are held down (default)
	// 'onUnlessPressed' - show, but hide while shortcut keys are held down
	"editor.inlayHints.enabled": "offUnlessPressed"
},

Note: This feature requires Dart 2.19 / Flutter 3.7 or later.

Type Hierarchy

You can change the direction of the type hierarchy using the “Show Subtypes” / “Show Supertypes” button on the hierarchy menu bar.

Note: This feature requires Dart 2.19 / Flutter 3.7 or later.

Call Hierarchy

#612: A Call Hierarchy is now available. It can be accessed from the editor context menu, or using the Calls: Show Call Hierarchy command in the command palette (F1).

You can change the direction of the call hierarchy using the “Show Incoming Calls” / “Show Outgoing Calls” button on the hierarchy menu bar.

Note: This feature requires Dart 2.19 / Flutter 3.7 or later.

Flutter

Editor

Testing

Debugger

Other

v3.56.0 2022-12-21

Editor

Flutter

Features/Fixes Enabled with Future SDKs

The following items depend on changes to the Dart/Flutter SDKs that have not yet been released to stable channels. They will show up automatically after you upgrade to the next (non-hotfix) Dart/Flutter SDK release. If you’re using a recent beta or master version, these items should be available to you and any issues should be reported on GitHub in the usual way.

v3.54.1 2022-11-30

v3.54.0 2022-11-29

Improved Status Bar Information

#4257: Several items that used to have their own status bar entries have been merged into VS Code’s new language status area. This can be found from the {} icon next to the language in the status bar.

Clicking the “pin” icon against an entry will move it back to being always visible on the status bar.

Flutter: New Project Platform Defaults

#4284: When creating a new Flutter project using the Flutter: New Project command it’s now possible to set the default platforms that should be enabled for new projects. This can be accessed from the “cog” icon when entering the project name.

These can also be set directly via the dart.flutterCreatePlatforms setting.

Flutter

Editor

Commands

Testing

Features/Fixes Enabled with Future SDKs

The following items depend on changes to the Dart/Flutter SDKs that have not yet been released to stable channels. They will show up automatically after you upgrade to the next (non-hotfix) Dart/Flutter SDK release. If you’re using a recent beta or master version, these items should be available to you and any issues should be reported on GitHub in the usual way.

v3.52.1 2022-11-02

v3.52.0 2022-11-01

Debugger

Flutter

Editor

Features/Fixes Enabled with Future SDKs

The following items depend on changes to the Dart/Flutter SDKs that have not yet been released to stable channels. They will show up automatically after you upgrade to the next (non-hotfix) Dart/Flutter SDK release. If you’re using a recent beta or master version, these items should be available to you now and any issues should be reported on GitHub in the usual way.

v3.50.0 2022-10-03

Flutter

Editor

Other

Rollout of New SDK Debug Adapters

#4194: Several issues that led to pausing the rollout of the new SDK debug adapters have been resolved in latest bleeding-edge builds of Dart/Flutter. As such, rollout will continue when using an SDK version with these fixes (which is currently only users of the Flutter/Dart master branches).

Additionally, users of pre-release SDKs (with a sufficient version number to include the fixes noted above) will immediately be opted-in to the new DAPs (skipping the progressive rollout used on the stable branch). If you notice any unexpected behaviour while debugging (or while not debugging 🙂) please file issues which as much detail as possible!

Features/Fixes Enabled with Future SDKs

The following items depend on changes to the Dart/Flutter SDKs that have not yet been released to stable channels. They will show up automatically when you update your SDK in future (or sooner if using beta/development channels - depending on the exact version).

v3.48.4 2022-09-16

v3.48.3 2022-09-07

v3.48.2 2022-09-06

v3.48.1 2022-09-05

v3.48.0 2022-09-01

Folder Renames

#2483: When using Flutter 3.3 / Dart 2.18, moving or renaming a single folder will now update import statements the same way renaming a single file will. Renaming/moving multiple files/folders at once is not currently supported.

Flutter

Debugger

New Debug Adapters for Dart and Flutter

New debug adapters (which provide the interface for VS Code to communicate with a running Dart/Flutter app) are available when using Flutter 3.3 / Dart 2.18. These new adapters are written in Dart provide some bug fixes and performance improvements over the original Dart-Code TypeScript adapters and will be easier to maintain/fix going forwards.

Users will be switched to the new adapters gradually over the coming releases, but they can be explicitly enabled/disabled by setting the dart.previewSdkDaps setting to true (opt-in) or false (opt-out). If not set (undefined), the extension will decide when to enable the new adapters.

Some initial improvements in the new adapters:

If you notice any unexpected differences when using the new SDK DAPs, please file an issue. You can tell whether you’re using the new SDK DAPs by using the Capture Debugging Logs command before launching your app and checking whether the log contains “Running SDK DAP” instead of “Running debugger via node”.

Editor

Testing

Other

Documentation

Features Enabled with Flutter 3.3 / Dart 2.18

Many features and fixes that previously required using pre-release versions of Dart/Flutter are now available after upgrading to stable Flutter 3.3 and/or Dart 2.18 SDKs.

v3.46.1 2022-08-03

v3.46.0 2022-08-02

Editor

Testing

Debugger

DevTools

Other

Features/Fixes Enabled with Future SDKs

These items rely on changes to the Dart/Flutter SDKs that have not yet been released to stable channels. They will show up automatically when you update your SDK in future (or if using beta/development channels depending on the exact version).

v3.44.0 2022-07-01

Flutter

General

Testing

Features/Fixes Enabled with Future SDKs

These items rely on changes to the Dart/Flutter SDKs that have not yet been released to stable channels. They will show up automatically when you update your SDK in future (or if using beta/development channels depending on the exact version).

v3.42.1 2022-06-01

#4003 v3.42.1 resolves an issue using bleeding-edge Dart/Flutter master where the language server could fail to start.

v3.42.0 2022-06-01

Dart: Add Dependency Improvements

#3811: It’s now possible to add multiple dependencies in one step using Dart: Add Dependency using commas between package names.

Flutter

Editor

Testing

DevTools

Docs / Website

Features/Fixes Enabled with Flutter 3.0/Dart 2.17

A number of features/fixes noted from in previous release notes that relied on an updated Dart/Flutter SDK are now available to stable channel users that have upgraded to Flutter 3.0/Dart 2.17, including:

Features/Fixes Enabled with Future SDKs

These items rely on changes to the Dart/Flutter SDKs that have not yet been released to stable channels. They will show up automatically when you update your SDK in future (or if using beta/development channels depending on the exact version).

v3.40.0 2022-05-02

Flutter

Debugger

Commands

Other

Features/Fixes Enabled with Future SDKs

These items rely on changes to the Dart/Flutter SDKs that have not yet been released to stable channels. They will show up automatically when you update your SDK in future (or if using beta/dev channels that already include the SDK parts of these changes).

Server-Provided Code Snippets

#3904: When using a new enough SDK, the local code snippets are suppressed and snippets will be provided by the Dart LSP server. Server-provided snippets are contextual and can adapt to your project settings and language version, including:

Go to Type Definition

#3833: Go to Type Definition allows navigating to the definition of a type of a symbol without first needing to navigate to the symbols definition.

Flutter

Editor

v3.38.2 2022-04-08

v3.38.1 2022-04-05

v3.38.1 was a release of the Flutter extension only. It fixes an error reported in the VS Code developer tools console while activating the extension.

v3.38.0 2022-04-04

Flutter

Editor

Debugger

Commands

Testing

Other

Features/Fixes Enabled with Future SDKs

These items rely on changes to the Dart/Flutter SDKs that have not yet been released to stable channels. They will show up automatically when you update your SDK in future (or if using beta/development channels depending on the exact version).

Experimental

These items also rely on changes to the Dart/Flutter SDKs that have not yet been released to the stable channels, but must also be opted-in to for now. If you’re using pre-release/master versions of Dart/Flutter, please consider enabling these and providing feedback!

v3.36.0 2022-03-01

Flutter

Debugger

Commands

Tasks

Experimental

Features/Fixes Enabled with Future SDKs

These items rely on changes to the Dart/Flutter SDKs that have not yet been released to stable channels. They will show up automatically when you update your SDK in future (or if using beta/development channels depending on the exact version).

v3.34.0 2022-02-01

Testing Improvements

Debugger

Editor

Flutter

Tasks

Pub

Docs

Features/Fixes Enabled with Future SDKs

These items rely on changes to the Dart/Flutter SDKs that have not yet been released to stable channels. They will show up automatically when you update your SDK in future (or if using beta/development channels depending on the exact version).

v3.32.0 2022-01-02

#3729: Pre-release channels are now available for the Dart and Flutter extensions. These channels will replace the manual vsix builds for preview/beta extension releases usually distributed via GitHub. These will usually be published a few times per month prior to stable releases.

If you’d like to help test new versions of the extensions before releases, you can switch to them using the buttons on the extensions pages within VS Code. You can switch back to the Release channel at any time.

While the VS Code marketplace doesn’t support pre-release version numbers, pre-release versions will be in the format x.ODD.YYYYMMDD format while release versions will be in the format x.EVEN.y. Pre-release channel users will always get the latest version of the extension, which may be a release version until a subsequent pre-release version is published after each stable release.

Testing

Flutter

Commands

Debugger

Editor

DevTools

Features Enabled with Future SDKs

These items rely on changes to the Dart/Flutter SDKs that have not yet been released to stable channels. They will show up automatically when you update your SDK in future (or if using development channels depending on the exact version).

v3.29.0 2021-12-01

Editor

Testing

Debugger

Flutter

Commands

Other

Features Enabled with Future SDKs

These items rely on changes to the Dart/Flutter SDKs that have not yet been released to stable channels. They will show up automatically when you update your SDK in future (or if using development channels depending on the exact version).

#3240: Color previews are now shown in more places, including user-defined constant fields. Additionally, the VS Code color picker can now be used to change Flutter colors in source code.

v3.28.0 2021-11-01

Automatic Test Discovery

#3591: It’s no longer required to open or run a test file for tests to be discovered. Test files will be discovered automatically at startup and expanding them will discover the tests within.

Non-Error Test Output

#3606: All output from tests is now recorded in the test history, rather than only error output:

Hot Reload for Dart

#2708: A new command Dart: Hot Reload allows hot reloading in Dart (non-Flutter) programs.

Other Test Runner Improvements

Flutter Improvements

Editor Improvements

Other

Documentation

Features Enabled with Future SDKs

These items rely on changes to the Dart/Flutter SDKs that have not yet been released to stable channels. They will show up automatically when you update your SDK in future (or if using development channels depending on the exact version).

v3.27.2 2021-10-11

v3.27.1 2021-10-08

v3.27.0 2021-10-04

Test Runner Improvements

#3574/#3572: Integration with the new VS Code Test Runner is now enabled by default. Some additional improvements have been made to the integration.

The test tree previously only populated from the file contents when it was first opened, and subsequently only when tests ran. Now the tree updates periodically as the file is modified, including removing tests that have been removed from the file without needing to re-run the whole file or clear the test results.

Dynamic tests (those with variables in their name or using features like Flutter testWidgets variants) are now grouped under a parent node using the name of the test from the editor. As well as being easier to manage, these can now be removed from the tree if the test definition is renamed rather than remaining until you re-run the entire file.

Failed tests will now show their failure message with an expandable Peek window containing the output and history for the test (this requires VS Code 1.61).

Running multiple tests from a gutter icon/tree node are now grouped together by suite so that they run more quickly rather than a seperate debug session per-test.

Flutter

Debugger

Editor

Commands

Docs / website

Other

Features Enabled with Future SDKs

These features rely on changes to the Dart/Flutter SDKs that have not yet been released to stable channels. They will show up automatically when you update your SDK in future (or if using development channels depending on the exact version).

Renaming Files with Classes

#3354: A new setting "dart.renameFilesWithClasses" has been added that allows automatic renaming of files (and updating imports) when classes are renamed if the class/filename match. The allowed options are "never", "prompt" and "always". "never" is the default and disables renaming. "prompt" will ask on each rename, and "always" will rename without prompting.

For the rename to work, the class name and the filename must match (apart from differences in PascalCase for class names and snake_case for files).

New TODO Comments Types

#2364: In addition to TODO, several new comment prefixes are recognised and generate diagnostics - HACK, FIXME and UNDONE. These can be controlled with the analysis_options.yaml file.

Editor Changes

v3.26.0 2021-09-01

Preview: VS Code Test Runner Integration

#3147/#3538: Initial support for VS Code’s new test runner is available behind the dart.previewVsCodeTestRunner preview setting.

The test runner in VS Code provides consistency across all languages and has some additional functionality that is not possible to build in extensions. In the coming releases the custom test runner in Dart-Code will be removed in favor of the VS Code runner.

The VS Code test runner looks a little different to Dart-Code’s and will persist results across sessions (this means you may see results from the last time you ran a test, even if it was in another VS Code session).

The VS Code test runner also adds new gutter icons showing the last state of a test that can be clicked to run the test (or right-clicked for a context menu).

Many of the existing Dart-Code test commands are available as built-in VS Code test runner commands (and in future, the Dart versions of these commands will be removed).

Improved Version Completion in pubspec.yaml

#2078: Version number completion in pubspec.yaml has been improved. Previously version numbers only showed up if you had previously completed that packages name, but now also show up for all packages that are in the saved version of pubspec.yaml. Versions maybe be annotated with latest or latest compatible to indicate whether there are other package constraints preventing you from using the latest.

These changes require an updated SDK so may not be available yet depending on your SDK channel and also may be unavailable if LSP is disabled (with "dart.previewLsp": false in your VS Code User Settings).

Settings for Flutter: New Project

Flutter

Editor

DevTools Integration

Commands

v3.25.1 2021-08-03

v3.25.0 2021-08-02

Improved Dependency Management

The commands are also available from context menus and the title menu in the dependencies tree.

The commands can also be invoked as quick-fixes on unresolved import 'package:' statements.

#3500: Finally, direct and dev dependencies can be removed directly from the context menu in the dependencies tree.

Note: Some of these features rely on an update to the pub deps command so may not be visible until a future SDK update depending on your SDK channel.

Fix All Command

#3445/#3469: The “Fix All” command is now available for Dart files and can fix all of the same issues as dart fix for the current open file in one step.

This can also be set to run on-save by adding "source.fixAll" to the "editor.codeActionsOnSave" VS Code setting.

Note: This feature relies on changes in the Dart SDK so may not be visible until a future SDK update depending on your SDK channel. It is also only available when running in LSP mode (so you must not have set "dart.previewLsp": false in your VS Code settings).

Flutter

Editor

Other

v3.24.2 2021-07-05

v3.24.1 2021-07-04

v3.24.0 2021-07-01

Dependencies View

#3095: The dependencies view now has tooltips that show the shortest path from your package to a transitive dependency to help you understand where it comes from.

Note: This feature relies on an update to the pub deps command so may not be immediately visible depending on your SDK channel.

Launch Configurations

#3414: The explorer context menu now includes a command to quickly create a launch configuration in launch.json for a script and open it for editing. This makes it easier to switch between launching different files at the top of the Debug side bar.

Debugger

Flutter

Editor

Docs

v3.23.1 2021-06-17

v3.23.0 2021-06-01

Profile Mode Improvements

#765: Running your Flutter app in Profile mode has been made simpler:

Profile CodeLens

A new Profile CodeLens shows against the main function in a Flutter app. Clicking this will run your app in profile mode and also automatically launch the DevTools performance page.

Debug: Profile Flutter App Command

A new command has been added that also runs your app in profile mode and automatically launches the DevTools performance page.

Launch.json Configuration Snippet

A snippet has been added to quickly add a profile mode configuration to your launch.json. This should be used if you need to customise arguments or environment variables for your app. You can also use a launch configuration to replace the built-in Profile CodeLens link (see issue #3311 noted below).

Additionally:

Improved Dependencies Tree

#3202: The dependencies tree is now split into seperate folders for direct, dev and transitive dependencies (this relies on SDK changes that have not yet reached the stable channel so may not appear immediately).

DevTools Integration

Editor

Debugger

Flutter

Other

v3.22.0 2021-05-03

Flutter Integration Testing

#3009/#3133: Flutter tests inside an integration_test folder are now recognised as tests and run on the selected device. See flutter.dev/docs/testing/integration-tests for more information on using the Flutter SDK’s package:integration_test.

New Refactors

#547/#545: New refactors have been added for Inline Method and Inline Local Variable (requires SDK update).

Editor

Items here marked “(requires SDK update)” also rely on changes in the Dart/Flutter SDKs so may not be immediately visible depending on your Dart/Flutter SDK channel.

Flutter

Debugger

Commands

Other

v3.21.1 2021-03-31

v3.21.0 2021-03-31

Editor

Many of these editor changes rely on changes in the Dart/Flutter SDKs so may not be immediately visible depending on your Dart/Flutter SDK channel.

Commands

Testing

Debugger

Flutter

v3.20.1 2021-03-03

v3.20.0 2021-03-01

Testing

#3048/#3131: The ability to run Skipped tests (--run-skipped) has been added to the test runner toolbar and context menus. This is currently only supported for Dart projects but will be enabled for Flutter projects in a future version. This allows a tests to be run even if they are annotated with skip: true to check their status without needing to modify the code.

#3097: Additionally, running a specific test from CodeLens links will always pass --run-skipped when supported, making it easy to run skipped tests directly from the editor.

Other test runner changes include:

Flutter

#3110/#3122: The hot-reload-on-save setting now has an additional option to reload on all saves (including auto-saves) as well as just manual saves.

Editor

Items here marked “(requires SDK update)” rely on changes in the Dart/Flutter SDKs so may not be immediately visible depending on your Dart/Flutter SDK channel.

Debugger

Commands

Other

v3.19.2 2021-02-06

v3.19.1 2021-01-29

Test Runner

LSP Semantic Tokens

#2202: LSP’s Semantic Tokens are now supported by Dart Code. In order to use semantic tokens you need:

Semantic tokens fix a number of inconsistencies in syntax highlighting that were not easily addressed using the original textmate grammar. Below is a screenshot comparing the original colouring (left) and new colouring (right).

Some specific issues this addresses:

LSP Improvements

Items here and in subsequent sections marked “(requires SDK update)” rely on changes in the Dart/Flutter SDKs so may not be immediately visible depending on your Dart/Flutter SDK channel (these changes are not in the stable channels at the time of the Dart Code release).

Flutter

Editor

DevTools Integration

The following items rely on changes in the Flutter SDK and DevTools so may not be immediately visible depending on your Flutter SDK channel (these changes are not in the stable channels at the time of the Dart Code release).

Debugger

Documentation

v3.18.1 2021-01-07

v3.18.0 2020-12-24

LSP Improvements

Several improvements have been made when running with the LSP Preview. Many of these rely on changes in the Dart language server so may not be immediately available depending on the Dart/Flutter channel you are using. At the time of writing, they have not yet reached the Flutter stable channel.

Flutter

Editor

Commands

Testing

v3.17.1 2020-12-10

v3.17.0 2020-12-04

LSP Improvements

Many enhancements have been made when running with the LSP Preview. Many of these rely on changes in the Dart language server so may not be immediately available depending on the Dart/Flutter channel you are using. At the time of writing, they have not yet reached the Flutter stable channel.

[LSP] Apply-all Fixes

#2926: Some quick-fixes are now able to be fixed for the entire file in one go.

[LSP] Complete Function Calls

#2823: A new setting dart.completeFunctionCalls will cause code completion on functions/methods to include parentheses and argument placeholders for required arguments.

[LSP] Format Selection

#812/#2790: It’s now possible to format only a selection of code (or also only lines modified according to source control).

[LSP] pubspec.yaml and analysis_options.yaml Code Completion

#114/#2110: Basic code completion is now available for pubspec.yaml and analysis_options.yaml files. This includes static identifiers and also lint names. It does not include Pub package names.

Editor

Flutter

Debugger

Testing

Commands

Other

Tasks

v3.16.0 2020-10-30

Language Server Protocol Preview

In an upcoming release Dart-Code will switch to using the Language Server Protocol for communicating with the Dart language server. Please consider enabling this now to help find any remaining issues before the switch.

Testing Improvements

#2357/#2828: A new command has been added to allow re-running all failed tests.

This is also available on the context menu for individual test suites.

#2826/#2892: Opening a test file will now automatically discover available tests without having to first run them. This functionality only works when using LSP (see above) and can only discover groups/tests with static names (without interpolated variables).

Editor

The following fixes apply when using LSP and require an updated Dart SDK so may not be immediately available unless you’re using a dev/master release of the SDK.

Flutter

The following fix requires an updated Flutter SDK so may not be immediately available unless you’re using a dev/master release of the SDK.

Terminal

Debugger

Other

v3.15.1 2020-10-15

v3.15.0 2020-09-30

Terminal

#2099/#2581/#2817: package: links are now detected in the built-in terminal and automatically linked as long as they are referenced by one of your projects.

Stack Trace Improvements

Flutter

Editor

The following changes include changes in the SDK and therefore may only apply when you are using a new enough SDK version. Those marked LSP may only apply when using the LSP preview ("dart.previewLsp": true in your VS Code settings).

Commands

DevTools

Debugger

v3.14.1 2020-09-07

v3.14.0 2020-09-03

Test Tree Improvements

Flutter

Debugger

Editor

Commands

Tasks

LSP and Analysis Server

These items only apply when running with the dart.previewLsp setting enabled and may require a very recent (or dev) SDK build. LSP will become the default in future, so please try it out and send feedback!

Documentation / website

v3.13.2 2020-08-05

v3.13.1 2020-08-01

v3.13.0 2020-07-31

Improved Debug Discoverability

#2216/#2677: Launch configurations for common cases are now contributed dynamically based on the contents of your project. These show up when clicking the Show all automatic debug configurations link on the Run side bar when there’s no launch.json or by running the Debug: Select and Start Debugging command.

The configurations that show up are conditional based on your project (for example whether it’s a Flutter project, and whether it has tests). Clicking the cog icon will copy the launch configuration into your launch.json to allow you to customize if required.

#2676: Following new VS Code guidelines, a Run and Debug icon will appear in the editor toolbar when the active file can be directly run/debugged by the Dart extension.

Improved Handling of Unsupported Platforms

#2602/#2651: If the Flutter project you have open does not support a platform simply because its project files are missing (for example you have enabled web or desktop previews but are missing the web/macos folders), the relevant device will now show up at the bottom of the device selector as “Enable (device)”.

Selecting the device will allow you to easily run flutter create . in the project to create the missing files.

Embedded DevTools Improvements

#2655/#2661: When the Embedded DevTools preview is enabled, clicking Dart DevTools in the status bar will now allow you to select which DevTools page to open, or load DevTools in an external browser.

#2679: Additionally, DevTools will now use the same background color as VS Code as long as it’s dart/light enough to not cause contrast issues. This change requires a Dart DevTools release too so may not be visible immediately.

Test File Creation

#2650/#2662: The existing Go to Test/Implementation command has been extended and now also appears as a context menu entry labelled Go to Tests in the explorer tree.

If the related test file does not already exist, you will be prompted to create it.

The file created will contain a stub test that uses package:test or package:flutter_test depending on the type of the open workspace.

This functionality works best if your test files match the paths of your implementation files, swapping lib for test and adding a _test suffix to the filename.

Flutter

Editor

Debugger

Testing

LSP Preview

These items only apply when running with the dart.previewLsp setting enabled. This will become the default in future, so please do try it out and send feedback!

Other

Docs

v3.12.2 2020-07-08

v3.12.1 2020-06-30

v3.12.0 2020-06-25

Preview: Embedded DevTools

#1488/#2578: A new setting (dart.previewEmbeddedDevTools) has been added that allows running DevTools embedded inside the VS Code window. This feature is experimental and requires DevTools v0.2.6 or later.

DevTools will become disconnected when you stop a debug session but if you leave the window open, it will be automatically reconnected when you start a new debug session.

Cupertino Icons and Colors

#2150/#2149: Cupertino icons and colors are now rendered in the gutter in addition to Material icons and colors.

Debugger inspect()

#2137/#2560: Calling dart:developer’s inspect() function will now print the object to the Debug Console in an expandable form allowing properties to be examined similar to the variables/watch panels.

Note: This only works for non-Widget classes as the Widget Inspector also uses this function in order to navigate source code.

Improved Outlines

#2475/#2515: Both the Flutter Outline and standard Outline trees have been updated with some additional labels (including return values and text/icons for Text/Icon widgets).

Update Imports on Rename

#2482/#2507: The update-imports-on-rename functionality added in the last release is now enabled by default. Set "dart.updateImportsOnRename": false in your VS Code user settings to disable this.

Editor

Commands

Flutter

Debugger

LSP

Some issues have been fixed in the LSP server in the Dart SDK. These fixes only apply when using the preview LSP support ("dart.previewLsp": true in your VS Code user settings) and when using a new enough version of the Dart/Flutter SDKs (which may not yet include stable channels).

Other

v3.11.0 2020-05-29

Preview: Update Imports on Rename

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.

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

Evaluation is not currently scoped to the file/class you have open in the editor.

Commands

Debugger

Editor

Flutter

Testing

Misc

v3.10.2 2020-05-16

v3.10.1 2020-05-03

v3.10.0 2020-05-01

Main Function CodeLens

#2356/#2359/#2373 CodeLens links are now available on main() methods for both applications and test scripts. This allows running the current file even if the current launch configuration specifies another script. These links can be toggled using the dart.showMainCodeLens setting.

The template field in a launch config (see below for an example) has been extended to support templating these CodeLens.

Run Tests on Device

#2363/#2374: A new launch config flag runTestsOnDevice has been added that allows you to create launch configurations that will run tests with flutter run on the select device instead of using flutter test.

Using the two features above together, you can add CodeLens links to easily run test scripts on a device:

{
	"version": "0.2.0",
	"configurations": [
		{
			"name": "Flutter App",
			"request": "launch",
			"type": "dart"
		},
		{
			"name": "Debug Tests on Device",
			"request": "launch",
			"type": "dart",
			"runTestsOnDevice": true,
			// This adds this config to CodeLens for test files
			"template": "debug-test-file"
		}
	]
}

Pub: List Outdated Packages

#2322/#2350: A new Dart: List Outdated Packages command has been added that runs pub outdated. It’s also available on the context menu and editor toolbar for the pubspec.yaml file.

This command will only show up when using >= v2.8 of the Dart SDK.

Custom Emulators

#1553/#2360/#2319: It’s now possible to add third party emulators that don’t show up in flutter emulators to the device selector using the dart.flutterCustomEmulators setting. The emulator must still show up in flutter devices once it’s been launched for it to be used to launch an app:

"dart.flutterCustomEmulators": [
	{
		"id": "my-emu",
		"name": "My Emulator",
		"executable": "/path/to/emulator",
		"args": ["--launch"]
	}
]

This setting also allows the command/args used to launch existing Flutter emulators to be overridden by using the same ID. For example, to force an existing Android emulator with the ID Pixel_2_XL_API_29 to run with -gpu host you can override its command/args:

{
	"id": "Pixel_2_XL_API_29",
	"name": "Pixel 2",
	"executable": "/Users/danny/Library/Android/sdk/emulator/emulator",
	"args": ["-avd", "Pixel_2_XL_API_29", "-gpu", "host"]
}

Editor

Debugger

Testing

Commands

Remoting Support

Other

v3.9.1 2020-04-06

v3.9.0 2020-04-03

Flutter: New Project Offline Mode

#1957/#2311: @ejabu Contributed a new setting dart.flutterCreateOffline that will cause Flutter: New Project to run in offline-mode.

Dart CLI Terminal Improvements

#2256/#2230/#2315/#2305/#2313: Running CLI apps in the terminal has received some improvements over the original release. Apps now run as real processes in a standard VS Code Terminal (instead of using a Pseudoterminal). This should resolve issues with certain keys (like backspace) not working correctly.

Note: You must be using Dart SDK v2.7.1 or later for this functionality to work.

Debugger

Commands

Editor

Testing

Preview: LSP

#2238/#2297: As part of ongoing work to migrate to the language server protocol, a new setting dart.previewLsp will force the analyzer to using the LSP protocol. This mode is not yet complete and has some known issues.

v3.8.1 2020-02-06

v3.8.0 2020-01-31

Flutter Interactive Code Samples CodeLens

#2151/#2232: New in-line CodeLens links have been added to open the interactive code samples from Flutter widget definitions.

Clicking the CodeLens link will open the interactive sample from the API docs in your browser.

This functionality replaces the previous Flutter: Open Widget Sample command.

Restart Frame

#2171: The functionality included as Step Back in the previous release has been moved to the call stack as Restart Frame. This allows jumping back to other frames than the immediate parent.

Editor

Debugger

Other

v3.7.1 2019-12-11

v3.7.0 2019-12-05

Debugger Improvements

Preview: Web Debugging

Note: Flutter’s web support is still in preview and only be available on some channels. See the Flutter site for more info.

#1773: Basic debugging support is available for Flutter web apps when launching on the Chrome device.

Breakpoints, stepping through code and the variables list should work. Features that depend on expression evaluation are not currently available (this includes the watch pane, evaluation in the debug console, hovering over variables, conditional breakpoints). There may be a delay of a few seconds when hitting breakpoints - this is a known issue.

Debug Mode Toggle

#1291/#2121: While debugging, a new status bar will allow quick cycling through the settings to control whether the debugger steps into only your own code, your own code and Pub packages, or all code including the SDKs. Changing the option here will automatically update the dart.debugExternalLibraries and dart.debugSdkLibraries settings as well as immediately apply them to all running debug sessions.

Run Dart CLI apps in Terminal

#99/#2102: It’s now possible to run Dart CLI apps in the Terminal pane instead of the Debug Console. This allows you to provide input to the processes stdin stream. You can enable this mode by adding "console": "terminal" to your launch configuration.

When you run your app, the Terminal pane should become focused and the output will appear there. You can type directly into the terminal.

Note: This mode has less functionality than using the debug console (for example stack frames in errors cannot be linked to source code) so it is only recommended if you require this stdin functionality. This feature uses a VS Code Pseudoterminal to connect the Terminal pane to the debugger and is not actually spawning the process in a shell as would be the case if you ran it from the terminal directly.

Preview: Step Back

#2052/#2117: A new setting dart.previewDebuggerStepBack enables a new Step Back button on the debug toolbar. This function works similar to Step Out but moves the execution pointer to before the invoked function instead of after. This allows re-executing code without restarting your application.

Note: Enabling this setting also adds another button (Reverse Continue) to the debug toolbar. This is not functional but VS Code does not currently provide a way to add the Step Back button without also showing Reverse Continue (microsoft/vscode#85215).

Editor Improvements

Preview: Placeholders for @required Arguments

#2123/#2132: A new setting dart.previewNewCompletionPlaceholders enables improved argument placeholder functionality for named arguments annotated with @required.

IconButton has two @required arguments, which are now populated with placeholders that can be <tab>‘d between.

Additionally, enabling this setting will resolve some inconsistencies with tabstops for named/non-named arguments (#1940).

Note: The dart.previewNewCompletionPlaceholders setting is likely to become the default in a future update so please try it out and provide feedback. Insertion of placeholders can be disabled entirely using the existing dart.insertArgumentPlaceholders setting.

Other Editor Improvements

Flutter Improvements

Web Improvements

Testing Improvements

VS Code Remoting Improvements

Other Improvements

v3.6.0 2019-11-01

Improved DevTools Integration

#1935/#1323/#1982/#1557: Integration with DevTools has had several improvements.

If an existing DevTools window is no longer connected to a debug session, launching again from VS Code will reuse that window in preference to spawning a new window. If an existing window is connected to the same debug session, launching again from VS Code will show a notification that will bring the existing DevTools window to the front when clicked.

Port numbers are now more predictable, starting at 9100 and increasing if that port is already taken (previously random port numbers would be chosen).

The debug toolbar has a dedicated button to launch the Flutter Widget Inspector. If you already have DevTools open and connected to the same debug session, it will navigate that window to the Inspector page rather than spawn a new window.

A new setting dart.openDevTools controls automatic launching of DevTools when you start a debug session.

The possible values are:

This setting can also be set at a workspace level (should you wish to apply it only to specific projects) and will reuse existing windows as described above.

Flutter

#2043: iOS Simulator names will once again be displayed in the status bar/device picker instead of the generic iOS Simulator label.

Preview: Flutter Gutter Icons and Colors

A new setting dart.previewFlutterGutterIcons has been added to enable the following gutter icons. If no issues are reported, these will be enabled by default in the next version.

#807/#2040: Flutter icon previews will appear in the gutter where they are referenced.

#2039/#2042: Flutter colour previews will now appear in the gutter of the editor for built-in Flutter colors and calls to the Color constructor.

Editor

#2011: Closing Labels will now update more quickly during typing. Previously a half-second delay was used to reduce the chance of them appearing in the wrong position during edits, but this is no longer required.

#2076: A new setting dart.enableMachineLearningCodeCompletion has been added to opt-in to the machine-learning backed code completion preview. Enabling this is equivalent to adding --enable-completion-model to the dart.analyzerAdditionalArgs setting.

#2067/#2046: Deprecated symbols will now be visually struck out in completion lists and in the code editor.

#1963: Deprecated symbols will be struck out in the Outline view.

Testing

#1871/#2060: A new command (which you can key-bind in the VS Code settings) has been added to jump between a file and its corresponding test file in the editor. This command will map lib/foo.dart to test/foo_test.dart and back. The command is only available when the current file can be mapped and the target file exists.

#2080: Opening a test file before restoring packages should no longer result in CodeLens action links not appearing for that file or tests failing to appear in the test tree after running.

#2055/#2053/#2054: Tests with quotes in their names can now be executed from the test tree, and also show test CodeLens action links.

Commands

Debugger

v3.5.1 2019-10-02

v3.5.0 2019-10-01

Flutter

Performance

Editor

Testing

Other

v3.4.1 2019-09-04

v3.4.0 2019-09-03

Custom Test CodeLens

These are standard launch configurations in a launch.json with the template field set to run-test or debug-test depending on whether you want to run in debug mode or not.

"configurations": [
	{
		"name": "Main application",
		"program": "bin/main.dart",
		"request": "launch",
		"type": "dart",
	},
	// Test launch config templates
	{
		"name": "Run in Browser",
		"request": "launch",
		"type": "dart",
		"template": "run-test",
		"args": [
			"-p",
			"chrome"
		]
	},
	{
		"name": "Debug in Browser",
		"request": "launch",
		"type": "dart",
		"template": "debug-test",
		"args": [
			"-p",
			"chrome"
		]
	}
]

Note: The launch config is used only when running from the CodeLens links and not when running from the test explorer context menu. This will be improved in an upcoming release.

Flutter Outline

#605/#961/#1932: The Flutter Outline tree added in the previous release is now enabled by default. Please continue to raise issues on GitHub with any issues or feedback.

This functionality can be disabled with the dart.flutterOutline setting.

Improved Flutter Errors

#1870/#1910: Support for improved Flutter error messages added in the previous release is now enabled by default. Please continue to raise issues on GitHub with any issues or feedback.

This functionality can be disabled with the dart.flutterStructuredErrors setting.

Flutter

Editor

Commands

Debugger

Other

v3.3.0 2019-08-02

Preview: Flutter Outline

#605/#961: Enabling the setting "dart.previewFlutterOutline": true will add a new Outline view to the side bar that includes the hierarchy of Flutter widgets in your build methods. Selecting a node in the tree will jump to the code that creates the widget and moving around the editor will select the appropriate node in the tree. Widget refactors are available on the context menu.

Note: The context menu will only appear if you first left-click the node to select it before right-clicking. This is a known limitation that we hope to address in future.

Improved Device Selector

#1809: The device selector has been improved and now contains both running devices and offline emulators in a single list. This list is always accessible from the device manager shown in the status bar and will also be shown if you try to launch an application without an appropriate device selected.

The list updates as devices are connected/disconnected and will be filtered to show only devices that are valid for projects in the current workspace.

Preview: Improved Flutter Errors

#1870: Enabling the setting dart.previewFlutterStructuredErrors activates a new experimental feature for showing more concise error messages from Flutter. A summary of the error will be shown in red, followed by detailed information on how to resolve the issue (where available). Stack traces will show frames from your own code brighter than those from framework or SDK code.

Please try this feature out and send feedback via GitHub.

Other Flutter Changes

Editor Changes

Debugger Changes

Test Runner Changes

Remoting Support

#1677/#435: Using Dart and Flutter in VS Code’s remote workspaces is now possible (for example Docker, WSL or SSH). Remote workspaces are still a preview VS Code feature so there may be issues, but please do open issues if you find things that don’t work correctly.

Other Changes

v3.2.1 2019-07-16

v3.2.0 2019-06-28

Code Completion Improvements

Flutter UI Guides Preview Improvements

Performance Improvements

Editor Changes

Flutter Changes

Other Changes

v3.1.0 2019-05-31

Preview: Flutter UI Guides

You can turn this on using the dart.previewFlutterUiGuides setting. Some things to note:

Please post all feedback about the UI guides feature here and add 👍 to this VS Code issue to show demand for improved VS Code APIs for features like this.

Flutter Changes

Editor Changes

Other Changes

v3.0.2 2019-05-13

v3.0.1 2019-05-09

v3.0.0 2019-05-07

Flutter Web Projects

It’s now possible to create and run Flutter web projects in VS Code! 🎉

To get started, run the Flutter: New Web Project command from the command palette.

Once the project has been created and packages have been fetched, you can launch your web project like any other by pressing F5 or starting from the Debug menu.

If there are multiple potential debuggers for the current file, you may be prompted to select a debugger. If so, select Dart & Flutter. If the active file is a Dart file then this should be picked automatically for you.

Chrome will launch automatically and once the build completes the Flutter app will load.

Limitations

The current version of Flutter’s web support has some limitations, including:

If you’d like to automatically Hot Restart when saving, you can enable the dart.flutterHotRestartOnSave setting. This will cause Save to trigger a Hot Restart (only for projects where Hot Reload is not supported). Since Hot Restart is not stateful, this setting is not enabled by default.

Chrome OS Support

Developing Flutter apps on Chrome OS is now supported via Chrome OS’s Linux support - both for the Play Store and Flutter for web. To do this a little bit of setup is required:

To avoid having to run adb connect 100.115.92.2:5555 after each boot, you can enable the dart.flutterAdbConnectOnChromeOs setting to automatically run this when the Flutter daemon starts up.

Once this is set up correctly, Google Pixelbook should appear as an available device in the status bar and you can run your Flutter app with F5 or the debug menu. The application will run using Chrome OS’s support for running native Android apps.

The Dart DevTools and Widget Inspector are fully supported here too. Run the Dart: Open DevTools command to launch them.

Flutter Web Projects

Flutter for web is also supported on Chrome OS but requires Chrome be installed in the Linux container (see the setup notes). Once this is installed you can follow the Flutter for web notes above to create and run Flutter web projects.

Limitations

On Chrome OS, only a specified set of ports from the Linux container are available at localhost from the main Chrome OS browser. This means that in order to use DevTools in the main Chrome OS browser fixed ports must be used for both the DevTools server and the VM service. This is enabled by default but comes at the expense of not being able to run multiple apps at the same time (since they’ll try to bind to the same port). If you need to run multiple apps you can disable the dart.useKnownChromeOSPorts setting (but if you want to use DevTools you’ll then need to install Chrome in the Linux Container - see the setup notes above).

Additionally, for Flutter web projects, the limitations mentioned above in the Flutter for web notes also apply.

Other Changes

v2.26.1 2019-05-01

v2.26.0 2019-04-26

Auto-Importing from Code Completion

#1060: Code completion now lists symbols that are not yet imported and will auto-import the required library when selected.

Items will show “Auto import from xyz” in their details when this will occur.

The import will be added once the selected item is committed. This also works for part files, where the import will be added to the relevant parent file.

This feature requires v2.2.1 of the Dart SDK and can be disabled with the dart.autoImportCompletions setting.

Improved Dependencies Tree

The dependencies tree has been updated and improved. It’s now (#1591) be available for workspaces that have multiple projects (either in sub-folders, or as part of a multi-root workspace), (#1622) sorts folders above files and (#1621) no longer shows projects in their own dependencies list.

Flutter Changes

Debugger Changes

Editor Changes

Other Changes

v2.25.1 2019-04-17

The required version of Dart DevTools was increased to v0.0.15

v2.25.0 2019-03-29

Hot Reload on Debug Toolbar

#1493: A new Hot Reload button (thunderbolt icon) has been added to the debug toolbar. As part of this change, the Restart button will now always Hot Restart and the existing setting to control this behaviour has been removed. In the current version of VS Code it’s not possible to change the position of this custom button, however it will be moved next to the Restart button in an upcoming release.

As a result of the Restart button now always being Hot Restart the keybindings have changed. The new keybindings are:

macOS Touch Bar Support

#936: New buttons have been added to the macOS Touch Bar during debug sessions. Buttons are available for the Flutter: Hot Reload, Dart: Open DevTools and Flutter: Take Screenshot commands.

As with the debug toolbar, the Hot Restart button will move next to the Restart button in an upcoming release.

Better Theme Support

#1050: A new option - dart.theme - has been added to inform the Dart extension whether you’re using a Light or Dark theme (unfortunately VS Code does not expose an API for this). This controls the color of the icons shown in tooltips (and maybe more in future).

#1496: Similarly, the dart.devToolsTheme setting will let you control which theme is used for the Dart DevTools. For now the default is light, however this may change to default to whatever dart.theme is set to in future when the Dark theme is more polished.

Flutter Changes

DevTools Integration Changes

Debugger Changes

Editor Changes

Commands Changes

Other Changes

v2.24.0 2019-02-27

Dart DevTools Integration (inc Flutter Inspector)

A new command Dart: Open DevTools has been added that allows you to launch the Dart DevTools for a debugging session. With a debugging session active, open the command palette and find the DevTools command.

The first time you run this (and subsequently when the DevTools package is updated) you may be prompted to activate or upgrade.

Clicking Activate/Upgrade will run pub global activate to activate the DevTools package for you.

If you have multiple debugging sessions active, you’ll be prompted for which one to open DevTools for.

DevTools will launch in your browser and be automatically connected to your debug session. For more information on the functionality of Dart’s DevTools see the DevTools docs.

While the Dart DevTools are active, you’ll see them in the status bar of VS Code. Clicking will re-launch your browser as long as there’s a suitable debugging session.

v2.23.1 2019-02-21

A bug that resulted in SDK detection failures if you had a folder named flutter inside your project has been fixed.

v2.23.0 2019-02-15

Dart: New Project

A new command Dart: New Project has been added that works similar to the existing Flutter: New Project and Flutter: New Project From Docs commands:

This command uses Stagehand to provide project templates. If you’ve not activated Stagehand before you’ll be prompted to do so the first time you use it. Clicking Activate Stagehand will automatically run pub global activate stagehand for you.

You’ll be presented with a list of project templates from Stagehand. The templates you see may vary based on the version of Stagehand you have activated.

After selecting a template you’ll be prompted for a name and folder and your project will be created and opened automatically.

Customizable Debugger Restart Button Behaviour

The restart button on the debug toolbar is now customizable for Flutter debug sessions.

In the VS Code user settings you’ll find an option named Flutter Debugger Restart Behaviour which allows you to change the behaviour of the restart button (and corresponding command/menu items) between Hot Reload and Hot Restart. The default behaviour remains as hot reload (though depending on feedback this could change in future).

Improved Project Picker

When running a command that requires a project root (for example Pub: Get Packages) that isn’t clear from your active file, you’re prompted for a folder. The built-in workspace-folder picker has been replaced with one that shows only Dart projects and can include sub-folders.

Improved Flutter Build Progress

The build progress shown during a Flutter build has been improved and now remains on-screen for the whole duration of the build rather than appearing and disappearing at each build step.

Flutter Extension Reminder

If you don’t yet have the Flutter extension installed, you’ll be reminded to install it when you open a Flutter project. In the future, some Flutter functionality will migrate from Dart to the Flutter Extension so installing it now will avoid any disruption.

Other Changes

v2.22.3 2019-01-31

A bug that caused Flutter’s Hot Reload to stop working if there were breakpoints in invalid locations has been fixed.

v2.22.2 2019-01-29

A bug that prevented unhandled exceptions in Dart CLI apps being shown in the debug console has been fixed.

v2.22.1 2019-01-25

The change to ignore dart binaries in your PATH that are not from the Dart SDK has been reverted because it broke handling of SDKs that came from symlinks in PATH. It will return in a future update minus the breakage.

v2.22.0 2019-01-25

Flutter: New Project From Docs

It’s now possible to create sample projects from the Flutter docs directly in VS Code with a new command Flutter: New Project From Docs.

This command will list the sample projects currently available in the docs.

Selecting a sample will automatically run flutter create --sample {sample ID} and open the project for you.

Note: This functionality requires both v2.22 of the Dart extension and v2.22 of the Flutter extension. While it’s currently possible to develop for Flutter with only the Dart extension, this may cease to be the case in future as more functionality migrates to the Flutter extension so if you haven’t already, you should install it.

Clickable Stack Trace Locations 🎉

Dart and Flutter stack traces in the Debug Console now have clickable links!

Run Test at Cursor

New commands have been added to run/debug the test for the current cursor location. The command is available in the same locations that the test CodeLens is available (the command will not be visible if your cursor is not in a valid location). For info on how to add key bindings, see here.

New Refactors

A new Extract Local Variable refactor has been added.

This extracts the code under the cursor into a variable and will allow you to type over its name.

There’s also a new Convert Method to Getter refactor to convert argument-less methods to getters.

Prompt to Launch with Errors

The preview setting from the previous release is now named dart.promptToRunIfErrors (no preview prefix) and is enabled by default. This will result in a prompt when launching if errors exist in your project.

Type Hierarchy Previews

The Show Type Hierarchy command has been updated and will now preview the relevant code as you move the selection up and down the list.

Editor Changes

Command Changes

Debugger Changes

Other Changes

v2.21.1 2018-12-05

v2.21.0 2018-11-28

Preview: Prompt to Launch with Errors

A new setting dart.previewPromptToRunIfErrors has been added that will prompt you before launching if errors exist in your project.

This will become the default behaviour in future so please try it out and open issues if it fires when you would not expect.

Improved Completion Icons for Folders/Files

Code completion for imports now shows file and folder icons from your VS Code theme.

Run All Tests in Launch Config

It’s now possible to create a launch config in launch.json that runs all tests (the same functionality as the Dart: Run All Tests command) by setting the program property to the path of a test folder. Unlike the command, this can be run with or without debugging (F5 / Ctrl+F5) whereas the command always runs without the debugger.

{
	"name": "All Tests",
	"type": "dart",
	"request": "launch",
	"program": "tests/", // or tests/foo for a subset of tests
}

Other Changes

v2.20.0 2018-11-02

Return of Inspect Widget

The Flutter: Inspect Widget feature that was added in v2.17.0 but disabled in v2.17.1 due to bugs is now re-enabled by default when using Flutter version v0.10.2 or later. This command allows you to tap on a widget on your device/emulator to highlight it and jump directly to the source code where it was constructed.

Lint Names in Problems View

VS Code now natively shows lint names and error codes in the Problems view so the dart.showLintNames setting has been removed.

Quick-Fix for Ignoring Lints/Hints

A new setting dart.showIgnoreQuickFixes (default: false) has been added that will add quick-fixes for ignoring lints and hints to the lightbulb menu.

These fixes will also show up in the Problems View.

Don’t Format Specific Files/Folders

Since VS Code does not allow per-folder/file settings, it’s now possible to stop certain files/folders from being formatted with the dart.doNotFormat setting. The setting is an array of string globs that are checked against the full file path.

"dart.doNotFormat": [
	"**/*.g.dart",
	"**/generated/**",
	"**/Google/flutter/**",
]

Note: Until this VS Code issue is implemented, this will stop both format-on-save and explicit Format Document calls from formatting.

Collapsed Call Stacks

When running in VS Code v1.29 (due in the next few weeks) stack traces will collapse “non-debuggable” code (based on your dart.debugSdkLibraries and dart.debugExternalLibraries settings).

Preview: build_runner Tasks

If you enable the dart.previewBuildRunnerTasks setting and your project references build_runner in its pubspec.yaml then new tasks will be registered with VS Code. You can find these by running the Tasks: Run Task, Tasks: Run Build Task, Tasks: Run Test Task commands in the palette. The tasks will appear as pub or flutter depending on the type of projects you have open.

Running the watch task will keep build_runner running in the background, re-building files as required when you save changes. If you wish to have the task run automatically when you start debugging you can add it as a preLaunchTask in your debug configuration.

Preview: toString() Calls in Debug Views

It’s now possible to force the debugger to call toString() on classes when displaying them in debug views (this includes the Variables pane, the Watch pane, tooltips and inline debug views) with the dart.previewToStringInDebugViews setting. This feature is experimental and may have a performance impact.

Before

After

Other Improvements

Note: This version requires VS Code v1.28 (up from v1.27).

v2.19.0 2018-10-01

Flutter Attach

Functionality has been added to attach to existing applications (for example a native Android app hosting a Flutter view). To attach, ensure your device is connected but the Flutter view to attach to has not yet been created. Then run the Debug: Attach to Flutter Process command from the command palette.

This will begin monitoring the device waiting for a Flutter view to start.

Now load the app and/or interact with the app to cause the Flutter view to be created. This will enter a normal debug session that supports all of the usual Flutter functionality (inc. Hot Reload, Hot Restart, debug toggles).

To detach from the debug session, click the Detach button on the right side of the debug toolbar.

For more information on adding Flutter to your existing app, see this page on the Flutter Wiki.

Current Limitations

Debugger Improvements

Code Editing Improvements

Other Improvements

Note: This version requires VS Code v1.27 (up from v1.26).

v2.18.0 2018-08-31

Debugger Improvements

Test Runner Improvements

Editor Improvements

Other Improvements

v2.17.1 2018-08-04

v2.17.0 2018-08-02

Inspect Flutter Widget

When debugging a Flutter application a new command Flutter: Inspect Widget appears in the command palette which allows you to tap on a widget on your device/emulator to highlight it and jump directly to the source code where it was constructed.

Note: In v2.17.1 dart.trackWidgetCreation - which powers this feature - was disabled by default while a bug is investigated. You can enable this but may find issues when hot reloading. flutter clean after enabling the setting may resolve these issues. This setting will be re-enabled by default once these issues are fixed.

Testing Improvements

CodeLens links now appear above tests and test groups that allow you to quickly run/debug an individual test or group without running the whole suite.

Several other improvements have been made to the test runner:

Flutter Screenshots

@timsneath and @Ramalus contributed a Flutter: Save Screenshot command to save screenshots from your device/emulator. The first time you use it in a session you’ll be prompted for a folder to save to (you can suppress this with the dart.flutterScreenshotPath setting) and shown a notification to quickly open the folder. This command can be bound to a key in your VS Code key bindings the same as any other command.

Signature Help

Signature help is now available to quickly look up arguments to functions without having to hover over them.

Signature help can be invoked with Ctrl+Shift+Space (macOS: Cmd+Shift+Space) or if the dart.triggerSignatureHelpAutomatically setting is enabled, will appear automatically when you type ( or ,.

This feature relies on a new feature in the Dart SDK. At the time of release this is available in the Flutter master channel but not yet on dev/beta channels.

Other Changes

v2.16.0 2018-07-16

Create Emulators

Emulators can now be created directly from the device selector.

The emulator created will be based on a standard Pixel device and named automatically.

This feature is only available when using a very recent Flutter SDK. Flutter’s master channel already has the required functionality but it may take a little longer to filter through to the beta channel.

Flutter Update Notification

When a new version of Flutter is available you’ll now see a prompt in the editor.

Clicking the Upgrade Flutter button will execute flutter upgrade inside the editor and once complete automatically reload the SDK in the background.

This feature requires a recent version of Flutter that provides better update checking; therefore you might not see this prompt on the next update if you’re on the current beta channel. Updates are only checked every few days so you might not see the prompt immediately when a new version is available.

Dart Test Runner

The test runner included for Flutter in the previous version is now enabled for Dart projects. This will only work for tests that can be run with pub run test and therefore will only activate if there is a .packages and a pubspec.yaml file in the project root.

Faded Dead Code

Unused imports/variables and dead code are now flagged to VS Code and will render slightly faded. You can control this with the editorUnnecessaryCode settings as described here.

Other Changes

v2.15.0 2018-06-29

Test Runner

A new test runner has been added that will render test results in a tree in the Test Side Bar.

Currently there is no detection of tests so they will only appear once you start running them which can be done with F5/launch.json, using the Start Debugging/Start Without Debugging options on explorer context menus or using the new Run All Tests command (noted below) to run all test files.

Clicking on a test will open the Output pane if there is any output from the test and also navigate you to the test in the source (note: navigating to the source required a change in Flutter which is currently only available on the master channel).

Note: By default this is only enabled for Flutter projects. You can opt-in for Dart projects by setting the dart.previewTestRunnerForDart setting to true though there may be some edge cases where this currently does not work correctly.

Run All Tests

A new command has been added to quickly run all tests in your project (the equivalent of flutter test or pub run test). This command will spawn a concurrent debug session for each workspace folder that contains tests.

Go To Implementation

Go To Implementation has been implemented to allow you to quickly jump to implementations from abstract members/interfaces.

Quickly Open in Android Studio or Xcode

New context menu entries have been added to ios and android folders to allow you to quickly open them in Xcode or Android Studio.

Filtered Extension Logging

The Dart: Capture Logs command has been extended to allow selection of which log categories to include when troubleshooting or reporting issues in the extension.

Other Changes

v2.14.0 2018-06-14

Outline View

VS Code 1.24 includes an Outline preview feature. This version improves the data provided to Code to allow rendering the symbol data in a tree.

Getters in Debug Views

Debugger views such as Variables, Watch and tooltips will now include getters as well as fields.

This is enabled by default but since getters could have side-effects you can disable this per-projects using the dart.evaluateGettersInDebugViews workspace setting.

Complete Statement

A new Dart: Complete Statement command has been added. This command will attempt to finish the current line you’re editing by adding things like closing brackets and semicolons before moving the cursor to the next line. You can bind this command to a key by running the Open Keyboard Shortcuts command in the command palette.

Daemon Progress Notifications

After installing a Flutter update via flutter upgrade or switching channel with flutter channel the first invocation of Flutter will download dependencies and build tools. If this hadn’t happened before opening VS Code then this would happen quietly in the background when Dart Code invoked the device daemon which resulted in unexpected behaviour (for example no devices being detected or delays in launching). Now when this happens, Dart Code will show notifications of what’s happening in the background so it’s clear why devices haven’t been detected (yet).

Improved Termination of Processes

A number of issues with terminating Dart and Flutter processes have been resolved, including:

Some of these fixes rely on support from the Flutter tools which means they only work when using a very recent Flutter SDK. Flutter’s master channel already has these changes but it may take a little longer to filter through to the dev and beta channels.

Simplified Diagnostic Log Capturing

A new command has been added to simplify collecting logs when reproducing/reporting issues in Dart Code/Flutter/Dart. It’s named Dart: Capture Logs in the command palette.

You’ll be prompted to select a location/filename for the log file and then a notification will appear informing you that logs are being captured.

When you click Stop Logging the resulting log file will be opened in the editor for you to review before you attach to a GitHub issue. Currently this file will include all types of logging (Analysis Server, Observatory, Flutter Run, Flutter Test, Flutter Daemon) so you should start it as close to reproducing your issue as possible. The option to select which log sources to capture may be added in a future update.

Other Changes

v2.13.2 2018-06-06

v2.13.1 2018-06-05

v2.13.0 2018-06-01

Emulator Launching

Emulators can now be launched directly from within Code. If you start debugging without a connected device you’ll be presented with a list of emulators on your system to launch.

After selecting a device a notification will appear while the device boots and connects.

You can also trigger the emulator selection by clicking on No devices in the status bar or by running the Flutter: Launch Emulator command from the command palette.

This feature relies on support from the Flutter tools which means it will only show emulators when using a very recent Flutter SDK. Flutter’s master channel already has this change, but it may take a little longer to filter through to the dev and beta channels.

Improved Folding

Code folding is now handled by Dart Code rather than being done by VS Code based on indenting. This should result in more accurate folding regions and also allows collapsing file headers and directives.

This feature relies on support from the Dart analysis server which means it will only activate when using a very recent SDK. Flutter’s master channel already has this change, but it may take a little longer to filter through to the dev and beta channels.

Flutter: New Project Improvements

New settings have been added to customize the Flutter: New Project command:

Debugger: Conditional Breakpoints and Log Points

You can now set Conditional breakpoints that will only break if the provided condition is true.

Log Points are like Breakpoints but rather than pausing execution they simply print() the message and then continue. This allows you to add debug information without having to insert print()s and reload the application or revert them when committing code. Like breakpoints, they also persist across sessions.

Debugger: Start from Explorer

You can now run specific scripts directly from the Explorer pane using the Start Debugging and Start Without Debugging options on the context menu. This bypasses what’s in launch.json and uses default behaviour for the given file (this includes selecting the correct debugger based on whether the script looks like Dart or Flutter and is in a test folder).

Debugger: Attach to Process

@stuartmorgan contributed Dart: Attach to Process which allows attaching the debugger to an existing process that you have an Observatory URL or port number for. You can configure this in your launch.json by setting request to attach or by simply running the Debug: Attach to Dart Process command.

You can also provide the observatoryUri in launch.json to skip this prompt when launching with F5.

Note: In this version the standard Dart debugger is attached, which means Flutter-specific functionality like hot reload will not be available.

Other Debugger Changes

Editor Changes

Other Changes

v2.12.0 2018-04-26

Support for Flutter Profile and Release Modes

You can now create launch configurations for profile and release modes for Flutter apps. For now, this requires you to create a launch.json and set the flutterMode argument.

For more information on using profile and release modes, see Running Flutter Apps in Profile or Release Modes.

Flutter Memory Usage Monitoring

When running a profile build (or if you set showMemoryUsage in your launch configuration) the total memory for your applications heaps will be shown in the status bar.

Note: This is heap usage and not total process memory. In debug builds it may not be reflective of actual usage in a release build.

Progress Notifications for Long Running Tasks

Long running tasks like Flutter: Get Packages and Flutter builds will now show more obvious progress notifications with progress animations.

As part of this, these actions may also now be cancelled from the x in the notification.

Flutter Icons in Tooltips and Completion Descriptions

Flutter icons now show correctly in tooltips and completion descriptions instead of chunks of HTML.

Extract Widget Refactor

An Extract Widget refactor is now available on the lightbulb menu that creates a new Widget class and inserts a call to its constructor in the original position.

Extract Method Refactor

An Extract Method refactor is now available on the lightbulb menu.

Better Feedback for Failed Renames

Failed renames will now show errors directly in the editor instead of window-scoped notifications that require dismissing. In an upcoming VS Code release we will stop the rename input box from appearing at a location that does not support a rename.

Preview: Better Handling of Windows Paths

A new setting (dart.previewExperimentalWindowsDriveLetterHandling) has been added. Setting this value to true will cause all drive letters to be converted to uppercase when Dart Code interacts with services like the analysis server. This should fix a number of issues affecting Windows users (unexpected errors like Type 'x' cannot be assigned to type 'x' or completion and errors not updating when referencing code with package: imports). In future this behaviour may become the default so please try it out and send feedback.

Other Changes

v2.11.2 2018-04-05


v2.11.1 2018-03-27


v2.11.0 2018-03-27

Flutter Test

Basic support for flutter test has been added. If you launch a file (by pressing F5 with no launch config, or by setting program in your launch config) that is inside the test folder of a Flutter project, the script will be run using flutter test. Output will appear in the Debug Console pane. All debugging functionality (breakpoints, etc.) should work as normal.

Flutter Test

Projects in Sub-Folders

When projects are found in sub-folders you will now be prompted to mark them as Workspace folders. This will allow Dart Code to better understand which folders are projects when detecting which debugger to run when pressing F5.

Projects in Sub-Folders

Note: VS Code will duplicate these workspace folders in the top level of explorer - please +1 this VS Code issue to allow this to be configurable.

Silent Extension Reloads

Many operations in Dart Code require re-initialising the extension. This was previously done by prompting the user to "Reload Window" which resulted in a visible disruption and all extensions re-initialising. In this version Dart Code silently re-initialises itself meaning no more prompts for actions such as changing SDKs. Since this operation still terminates and restarts the Dart analysis server it may take a few moments to re-analyze your project.

SDK Picker for Flutter

The Flutter version number now appears on the status bar and allows quickly switching SDKs by clicking onit (this functionality already existed for Dart). Set the dart.flutterSdkPaths setting to an array of SDK folders (or folders containing SDKs) to use this. Note: This does not change your Flutter channel but relies on having multiple versions of the SDK in different folders (you can do this without multiple clones by using git worktree as shown in our Travis script).

SDK Picker for Flutter

Other Changes

v2.10.0

v2.9.2


v2.9.1


v2.9.0

v2.8.2


v2.8.1

Code 1.20.0 included a change that broke debugging for projects without a launch.json. A fix is on its way but in the meantime a workaround has been added to restore the ability to debug. As a consequence you will need to select the correct debug type twice when first debugging a project with no launch.json but this will be addressed in a future update (after Code’s fixes are live).


v2.8.0

v2.7.3


v2.7.2

This version contains no functional changes but updates some internal references to the extension’s publisher ID which has been changed from DanTup to Dart-Code.


v2.7.1


v2.7.0

v2.6.2


v2.6.1


v2.6.0

Note: This version requires Visual Studio Code 1.18.

Multi-root support

VS Code 1.18 gained support for multi-root workspaces, which allows multiple folders to opened at the same time. Perviously, much of Dart Code’s functionality would just act on the first folder in the list. Now, all functionality should work as you would expect.

Other Changes

v2.5.1


v2.5.0

v2.4.4


v2.4.3

Note: This version requires Visual Studio Code 1.17.


v2.4.2


v2.4.1

Note: This version requires Visual Studio Code 1.16.


v2.4.0

v2.3.5


v2.3.4

New Preview Features available in this version


v2.3.3


v2.3.2


v2.3.1

New Preview Features available in this version


v2.3.0 - Flutter Debugging Commands

Several new commands have been added to aid Flutter debugging. These appear in the command palette but can be bound to keys in the Keyboard Shortcuts window in Code.

Additionally the default hotkey for Organize Directives has been removed to avoid a warning from Code about modifier keys. You can rebind this command in Code’s Keyboard Shortcuts window.

v2.2.0

v2.1.0

Note: If you previously installed a beta version of Dart Code to help with testing Flutter integration, please uninstall it and close all Code instances before installing v2.0 from the marketplace.

v1.4.2

Note: This version requires Visual Studio Code 1.13.


v1.4.1


v1.4.0

v1.3.0

v1.2.0

v1.1.0

* Your launch.json file should automatically be tidied up when you first open your project.

v1.0.2


v1.0.1


v1.0.0

v0.15.1


v0.15.0

v0.14.9


v0.14.8


v0.14.7

Note: This version requires Visual Studio Code 1.8.


v0.14.6


v0.14.5


v0.14.4


v0.14.3


v0.14.2


v0.14.1


v0.14.0

Note: Due to use of new APIs, Dart Code v0.14 requires Visual Studio Code v1.6 or newer.

Debug Just My Code

New settings have been added controlling whether to step into SDK and external library code when debugging. When first opening Dart Code with this change you will be prompted to choose whether to “Debug just my code” or “Debug all code”. You can change this at any time with the dart.debugSdkLibraries and dart.debugExternalLibraries settings.

Analysis Server Error Reporting

If the analysis server encounters an error you will now be prompted (up to 3 times per session) to report the issue to the Dart team. Clicking “Generate error report” will build a document of markdown that you can simple copy/paste directly into the Dart SDK issue tracker (linked at the top of the report).

Misc

v0.13.1


v0.13.0

v0.12.0

v0.11.2


v0.11.1


v0.11.0

v0.10.0

v0.9.0

v0.8.2

v0.7.0

v0.6.2

Additionally, a new option dart.allowAnalytics was added to control if analytics are sent. Only very basic events are captured (such as extension activation and if you toggle certain features) and are sent along with the extension version/platform. No code, filenames, project names or personal information will be sent. Source code for all analytics is visible here.


v0.6.1

v0.5.2

v0.1.0