For instructions on installing the Dart or Flutter extensions, go here.
#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:
- #4250: Debugging tests fail if the description has an interpolated value and is composed of two concatenated strings
- #4168: Parens around test name prevents CodeLens links from working
- #4150: Tests with the same name except for an interpolated variable will all run together instead of only the selected test
- #4099: “No tests match regular expression…” when running tests using Glados property-based testing
- #3630: Test CodeLens cannot run tests that are outside of their
group()call in the source code
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 (
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:
- Imports added to the destination file may be to the declaration of moved references instead of the original imports being copied from the source file. This is a bug and a fix is in progress for a future release.
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:
,nq- don’t include quotes around strings
,h- render in hexadecimal
,d- render in decimal
Format specifiers apply to child values so adding
,nq to an expression that evalutes to a
List<String> will suppress quotes for each value.
- #4408: When using the new SDK debug adapters (enabled for Dart and rolling out for Flutter), Global Variables will be shown in the Variables pane.
- #4429: The Run/Debug editor buttons are now available for files outside of the
- #4515: The new
flutter debug-adapterdebug adapter should no longer sometimes throw “thread was not found” errors.
- #764: When using the new SDK debug adapters, breakpoints are no longer marked as verified immediately and will appear grey until the VM resolves them.
- #4511: Adding
"suppressWebServerDeviceBrowserLaunch": trueto a launch configuration will suppress the browser being automatically opened when using the
- #4494: @pouyakary modified Flutter UI Guides to have rounded corners.
- #4491: The Flutter device name is now automatically included in debug session names to make it easier to start multiple debug sessions for different devices.
- #4281: Clicking the Restart button during a Profile/Release debug session is now supported when using the new SDK debug adapters.
- #4510: The Flutter: Select Device command no longer silently fails if the Flutter device daemon has terminated.
- #4475: Trying to start a debug session after the Flutter device daemon has terminated no longer hangs.
- #3988: Flutter code snippets like
stlessthat add imports no longer import from a packages private
src/folder when a public import is available.
- #4501: Developing in the Dart SDK repository checked out as a git worktree no longer triggers unwanted executions of
- #4519: The extension no longer fails to activate on modern versions of Theia.
- #4484: The error “Cannot read properties of undefined (reading ‘logger’)” is no longer written to the console at startup.
- #4424: The dartcode.org website now lists information about the analytics collected by the extension. The extension also includes a
telemetry.jsonthat is included in the output of the
Some feature requests and fixes require new features and fixes in upstream projects like VS Code and LSP which use counts of 👍s on those issues to help gauge demand. The Dart-Code website now lists some of the most significant upstream issues with a description of the feature/fix they would enable. Please consider reviewing this list and adding your 👍 to any GitHub issues relevant to features you’d like to see!