For instructions on installing the Dart or Flutter extensions, go here.
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:
- never: Never launch DevTools automatically
- flutter: Launch DevTools automatically when a Flutter debug session begins
- always: Launch DevTools automatically when a Dart or Flutter debug session begins
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.
#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
#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
#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.
#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
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.
- #2024/#2037: Creating new projects with
Flutter: New Projectand
Dart: New Projectwill now use the current-workspace SDK path (as selected with the Change SDK commands) for project creation, by writing the setting into the newly-created project’s VS Code workspace settings file.
- #2083: Go to Symbol in Workspace should no longer sometimes go to the first line of the file instead of where the symbol is declared.
- #2034/#2021: Detection of test files has changed from being “anything that is in the
/test/folder or ends with
_test.dart” to “anything that is both in the
/test/folder and ends with
_test.dart”. This fixes some issues where running scripts from folders named
testor scripts that are named
binfolder would be unexpectedly executed through
- #1992: The debuggers Variables window will no longer fail to render any class fields/getters if one of them returns an error.