For instructions on installing the Dart or Flutter extensions, go here.
v3.48.4 2022-09-16
- #4162: The Inlay Hints setting has been overridden from VS Code’s default of “on” to “offUnlessPressed” for Dart. This prevents inlay hints showing up automatically for users on bleeding-edge/master SDKs that have support for this feature.
v3.48.3 2022-09-07
- Rollout of the SDK DAP for Flutter has been postponed due to a number of crash reports (https://github.com/flutter/flutter/issues/111045). The Flutter SDK DAP can still be enabled with
"dart.previewSdkDaps": true
but automatic rollout is paused.
v3.48.2 2022-09-06
- #4147: Rollout of new SDK debug adapters has been disabled for Windows users while an issue with breakpoints not working is addressed. All Windows users will continue to use the original debug adapters until this issue is resolved, when the rollout will resume.
v3.48.1 2022-09-05
- #4139: The Flutter: Hot Reload and Flutter: Hot Restart commands are no longer missing (and with them, reload-on-save functionality) when running without debugging if using the new SDK DAPs.
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
- #3015: The “Wrap with widget” refactor now sets the selection to
widget
ready to type a widget class name. - #4061: The other “Wrap with …” refactors now set the caret position to the opening paren rather than the closing paren (which may be many lines below).
Debugger
- #4074: Adding breakpoints in files that will not be hit because of debugger settings will now show a prompt even if debugger settings have previously been customised.
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:
- #4066: Running a Flutter app using “Run”/”Run without Debugging” no longer requires an active connection to the VM Service on the device running the app.
- #3551: Breakpoints set in Dart SDK libraries by navigating with Go-to-Definition are now supported for Dart applications (not yet for Flutter apps).
- #3522: Stepping through Dart SDK files when debugging Dart apps no longer opens duplicate copies of the SDK libraries (not yet for Flutter apps).
- #3921: Detaching from an attached Flutter process will remove breakpoints and automatically resume.
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
- #4112: The “You are modifying a file outside of your open folders” warning will no longer appear for non-Dart files.
- #4097: The
dart.useLsp
setting has been replaced bydart.useLegacyAnalyzerProtocol
and its meaning inverted. This setting will be removed in a future version. If you find that you need to enable use of the legacy protocol, please file an issue detailing why.
Testing
- #4125: Tests with more than one newline in their names will no longer fail to run from CodeLens links.
Other
- #4110: The
dart.runPubGetOnPubspecChanges
setting has changed from a boolean to support “always”, “prompt”, “never”. The new “prompt” setting will force a prompt to be shown when pubspec changes before fetching new packages. - #4080: The
dart.customDevToolsUri
setting added in the previous release has been replaced with a newdart.customDevTools
which can launch a local development version of DevTools itself to aid debugging the embedded view if contributing to DevTools. Using this setting is documented in the DevTools contribution guide.
Documentation
- #4126: Docs detailing all available launch configuration options have been updated to include
templateFor
.
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.
- #3934: The ordering of diagnostics will now remain stable during typing (where the specific diagnostics do not change) to avoid VS Code’s Peek Error (
F8
) functionality from changing the selected error during typing. - #3929: Opening loose
.dart
files that are not part of a project (with apubspec.yaml
oranalysis_options.yaml
) will no longer sometimes cause some “File is not being analyzed” errors during startup. - #3906: Code completion for the named argument
children: []
will no longer insert[]
if completion is invoked on thechildren
label and a value is already present. - #3892: Accepting code completion suggestions should no longer sometimes delete additional characters when the system is under load/slow.
- #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.
- #3952: Using
source.fixAll
ineditor.codeActionsOnSave
is no longer very slow (despite the command being very fast when run on its own). - #3975: Flutter Widget snippets now include
return Container()
as a placeholderbuild
method. - #3981: “Add curly braces” now shows as a Quick-fix for the
always_put_control_body_on_new_line
lint. - #3970: Ctrl+Click/Go-to-Definition now works on filenames in “part of” directives.
- #3950: Code Actions such as Dart: Sort Members and Organize Imports will now fail silently if configured to run on-save (via
editor.codeActionsOnSave
) and show errors if invoked manually. - #4020: Ctrl+Click on constructor declarations now automatically searches for references (depending on VS Code settings) as it already did for other types of declarations.
- #4017: The
fun
snippet to create functions has been restored. - #4000: The Dart: Convert Method to Getter and Dart: Convert Getter to Method refactors will no longer show up in locations where they are not valid (and would error if selected).
- #4029: The Dart: Extract Method refactor no longer shows up for import prefixes.
- #4027: Code completion will no longer sometimes insert a literal
(...)
instead of parameter placeholders. - #3943: Code completion for symbols that start with
$
that are not yet imported will no longer insert duplicate$
s when selected. - #3945: Error messages shown when trying to launch DevTools for a build that does not support it have been improved.
- #4039: When using SDK debug adapters (via the
"dart.previewSdkDaps"
setting or automatic opt-in described above), exception popups now include the full exception text (matching the existing debug adapters). - #4053: The Extract Method refactor no longer incorrectly adds the
async
keyword to synchronous code that contained asynchronous callbacks. - #4031: Several issues with Go to Definition not navigating correctly on
super
/this
formal params have been resolved.
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!