For instructions on installing the Dart or Flutter extensions, go here.
v3.4.1 2019-09-04
- #1967: Running tests from CodeLens links will longer report “Running the contributed command failed”.
v3.4.0 2019-09-03
Custom Test CodeLens
- #1901/#1916 It’s now possible to create custom launch configurations for running your tests, for example to pass different arguments or environment variables to the test run.
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
- #1924: The Flutter: New Project command will now create projects using Swift (iOS) and Kotlin (Android) by default. These can be configured with the
dart.flutterCreateAndroidLanguage
anddart.flutterCreateIOSLanguage
settings. - #1943: A new setting
dart.flutterAndroidX
enables passing the--androidx
flag when running the Flutter: New Project command. - #1905/#1909: A new setting
dart.flutterAdditionalArgs
allows custom arguments to be passed to all invocations of Flutter. For example, this allows passing--local-engine
to enable running with a locally built engine. - #1933: The Flutter: Run Flutter Doctor command will now always run with the verbose
-v
flag. - #1919: A race condition that caused devices to stop showing up in VS Code for some users in the last version has been fixed.
Editor
- #1931: Using VS Code key-bindings to open a filtered list of refactors was broken in the previous release by an optimisation but has now been fixed.
- #1937: Opening a loose Dart file outside of any folder is not currently supported, but used to fail in silent and confusing ways. A suitable notification is now shown the first time this happens per-session.
- #1944: A new setting
dart.additionalAnalyzerFileExtensions
allows additional file extensions to be included in analysis to help those developing analyzer plugins that handle non-Dart source files. - #1930: The
extension
keyword is now correctly colored.
Commands
- #1302: A new command has been added Dart: Use Recommended Settings that will write some recommended Dart settings to your VS Code user settings (in the
"[dart]"
section). These settings address some common complaints around code completion and highlighting behaviour as well as enabling automatic formatting. Please try them out and send any feedback about these recommendations. - #1760: When Chrome is not installed, DevTools will now launch in the default browser instead and show a warning that it may be unsupported.
- #1416: The Dart: Capture Logs notification is now shown as a progress notification which means it will no longer collapse into the bell icon after some seconds have passed.
- #1906: A new command Dart: Stop Logging has been added that performs the same function as clicking Cancel on the logging notification.
- #1917: Command output will no longer sometimes show
[undefined]
where the folder name should be. - #1897: The Open in Android Studio context menu item should now work more reliably across different versions.
Debugger
- #1927: When editing a package that does not have its own entry points, pressing
F5
without alaunch.json
will now check for anexample/
project to launch instead of failing with an error. - #1911: Non-source stack frames in errors like
<async suspension>
are now dimmed like SDK frames instead of bright red. - #1942: Running scripts from the
.dart_tool
folder will now always run on the Dart VM (even for Flutter projects) to simplify debugging of code generator scripts.
Other
- #1896: The Locate SDK button now correctly saves the folder you select to your user settings.
- #1907: When running in a remote environment (for example using VS Code remoting functionality), browser windows spawned (for example when opening DevTools) will now automatically tunnel ports to avoid having to set them up manually.
- #1384: In the latest VS Code release, a Dart icon was added to the default Seti icon theme 🎉.
Upstream Issues
Some feature requests and fixes require new features and fixes in upstream projects like VS Code and LSP which use counts of 👍s on those issues to help gauge demand. The Dart-Code website now lists some of the most significant upstream issues with a description of the feature/fix they would enable. Please consider reviewing this list and adding your 👍 to any GitHub issues relevant to features you’d like to see!