Hi all,
v3.13.0 of the Dart/Flutter VS Code extensions have been published. Release notes are below/online.
#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.
#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.
#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.
#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.
dart.enableSnippets
allows disabling the built-in Dart and Flutter code snippets.package:test
is added to the pubspec.yaml
after the file was opened for the first time.pub get
no longer runs automatically for pubspecs modified inside dot-folders or the build
folder.toString()
methods the debugger will call when inspecting values has been increased from 15 to 100.dart.debugExtensionBackendProtocol
allows switching from WebSockets to Dart SSE for the debug extension backend when debugging web apps using the Dart Debug extension and Flutter web-server device.dart:developer log()
messages without truncation.test_driver
folder will now automatically have the VM_SERVICE_URL
enviroment variable set if an instrumented app is running.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!
stderr
stream is now correctly logged to the log file.--dart-define
in a launch configuration is now documented with an example.