For instructions on installing the Dart or Flutter extensions, go here.
- #3413: Opening the DevTools Performance page no longer shows “The performace screen is not available for this application” for some versions of Flutter.
Profile Mode Improvements
#765: Running your Flutter app in Profile mode has been made simpler:
A new Profile CodeLens shows against the
main function in a Flutter app. Clicking this will run your app in profile mode and also automatically launch the DevTools performance page.
Debug: Profile Flutter App Command
A new command has been added that also runs your app in profile mode and automatically launches the DevTools performance page.
Launch.json Configuration Snippet
A snippet has been added to quickly add a profile mode configuration to your
launch.json. This should be used if you need to customise arguments or environment variables for your app. You can also use a launch configuration to replace the built-in Profile CodeLens link (see issue #3311 noted below).
- Creating a new launch.json using the create a launch.json file link in the Run side bar will now include both a debug and profile configuration.
- The automatic debug configurations accessible from the show all automatic debug configurations link on the run side bar and through the Debug: Select and Start Debugging command now also include a Flutter Profile Mode option.
Improved Dependencies Tree
#3202: The dependencies tree is now split into seperate folders for direct, dev and transitive dependencies (this relies on SDK changes that have not yet reached the stable channel so may not appear immediately).
- #3365: DevTools windows will now inherit the font size set in VS Code’s
editor.fontSize(requires DevTools update).
- #3332: LSP now has support for the Expand Selection command and will expand to method and constructor invocations (requires SDK update).
- #3329: LSP now correctly highlights escape characters in strings (requires SDK update).
- #3318: Syntax highlighting for complex expressions in interpolated strings has been improved when using LSP (requires SDK update).
- #3297/#1201: Parameter lists that span multiple lines can now be folded (requires SDK update).
- #2937: Quick-fixes that create constructors now honor the
sort_constructors_firstlint when picking where to insert the new constructor (requires SDK update).
- #1890: A new “Wrap with builder” code action has been added that works like “Wrap with widget” (requires SDK update).
- #3340: Workspaces that contain virtual folders (such as LiveShare) are now able to load the Dart extension. This restores previous behaviour that was disabled by a VS Code update requiring extensions to explicitly opt-in to this behaviour.
- #3338: The “Starting debug session” toast notifications should no longer stay around after the app starts when running in profile/release modes.
- #3326: Error text in the debug console no longer uses custom colours that could result in low contrast when using custom themes with some background colors.
- #3311: Custom CodeLens links can now replace the built-in Run/Debug/Profile links by using
- #3169: A new setting
dart.cliConsoleallows setting the default console (
terminal) for Dart CLI apps.
- #3353: Launch configurations can now use the
serviceInfoFilefield for Flutter applications to aid attaching to apps spawned by custom embedders.
- #3358: Restarting the debug session for a Dart CLI script no longer results in the “Terminating debug session” toast notification staying around.
- #3315: A new setting
dart.flutterShowEmulatorscontrols whether emulators are hidden from the device selector in remote workspaces. This may be useful if your remote workspace is a local container and you can interact with emulator processes spawned inside it.
- #3352: @Delgan contributed updating the Launch Emulator command to also take the
dart.flutterShowEmulatorssetting into account.
- #3347: The
stanimFlutter snippets have been updated to assume null-safety and no longer generate warnings when used in projects created with the latest stable Flutter SDK.
- #3343: The “Convert to StatefulWidget” code action no longer adds an additional underscore if the class already contains one (requires SDK update).
- #3376: Icons previews now work for many new Icons added to Flutter.
- #3361: The dependencies tree will no longer highlight project folders in red if the project has errors.
- #3304: The Dart extension now only activates at workspace-open if a pubspec/Dart file is found in the top 3 levels. Previously a full workspace search would be done which could be slow and would often trigger a 7 second timeout in VS Code which caused it to pre-emptively activate. This could result in the Dart extension running for large non-Dart workspaces. If your workspace does not have a Dart file within the top 3 levels the extension will still activate if you open a Dart file further down the tree.
- #3348: Adding additional folders to the workspace with File -> Add Folder to Workspace will no longer generate errors in the console when using LSP.