For instructions on installing the Dart or Flutter extensions, go here.

v2.19.0 2018-10-01

Flutter Attach

Functionality has been added to attach to existing applications (for example a native Android app hosting a Flutter view). To attach, ensure your device is connected but the Flutter view to attach to has not yet been created. Then run the Debug: Attach to Flutter Process command from the command palette.

This will begin monitoring the device waiting for a Flutter view to start.

Now load the app and/or interact with the app to cause the Flutter view to be created. This will enter a normal debug session that supports all of the usual Flutter functionality (inc. Hot Reload, Hot Restart, debug toggles).

To detach from the debug session, click the Detach button on the right side of the debug toolbar.

For more information on adding Flutter to your existing app, see this page on the Flutter Wiki.

Current Limitations

It’s not currently possible to attach to a Flutter view that has already been created.

Breakpoints in startup code may be missed because the code may execute before breakpoints are initialised (you can temporarily work around this by putting a delay in your startup code).

Debugger Improvements

Scripts inside bin/ or tool/ folders will now always run directly on the VM and not through flutter run even if inside a Flutter project.

or folders will now always run directly on the VM and not through even if inside a Flutter project. An issue where debug sessions might continue to run in the background after clicking the Stop button on the debug toolbar has been resolved.

A new command Dart: Rerun Last Debug Session has been added to the command palette. This command is bound to Ctrl + Shift + F5 (macOS: Cmd + Shift + F5 ) and will rerun the previous debug configuration. This is particularly useful if you use the Run / Debug CodeLens test links or run your “current file” and wish to rerun the same file/test(s) after navigating to a different file.

has been added to the command palette. This command is bound to + + (macOS: + + ) and will rerun the previous debug configuration. This is particularly useful if you use the / CodeLens test links or run your “current file” and wish to rerun the same file/test(s) after navigating to a different file. A rare race condition that could result in a failure to attach the debugger has been fixed.

Code Editing Improvements

Icon previews in tooltips/completion have been fixed for the Flutter master channel which had started rendering HTML chunks.

channel which had started rendering HTML chunks. Syntax coloring now understands the mixin keyword.

Other Improvements

Long-running commands like pub get now have a cancel button on the notification.

now have a cancel button on the notification. A Scheme is missing error that sometimes appeared in the console if .packages contained relative paths has been fixed.

error that sometimes appeared in the console if contained relative paths has been fixed. The dependency tree will now reappear if you remove the second-to-last workspave folder from your workspace (it shows only when there is exactly one workspace folder).

Using the Dart SDK from Flutter for simple Dart projects/libraries will now display “Dart from Flutter {flutter SDK version numer}” in the status bar instead of an incorrect/stale Dart SDK version number.

A warning about multiple breakpoint responses should appear in the console less often (but is not entirely eliminated yet).

The Dart: Capture Logs command will now use a VS Code-provided log folder rather than prompting. When you stop capturing logs the file will open and you can use Save As to save it to another location if desired.

Note: This version requires VS Code v1.27 (up from v1.26).