devtools 0.1.7

Build Status

What is this? #

This is a companion repo to the main Flutter repo. It contains the source code for a suite of performance tools for Dart and Flutter.

Getting started #

For documentation on installing and trying out DevTools, please see our docs.

Feedback #

Feedback and issues are best reported at Thanks for trying out DevTools!

Terms and Privacy #

By using Dart DevTools, you agree to the Google Terms of Service.

0.1.7 - 2019-09-09 #

  • Fix bug with profile mode detection.
  • Enable expand all / collapse to selected functionality in the inspector (will not be available until certain changes land in Flutter stable).
  • Fix analytics bug for apps running in profile mode.
  • Fix bug in memory experiment handling.
  • Hide Dart VM flags when the connected app is not running on the Dart VM (web apps).
  • Former "Settings" screen is now the "Info" screen - updated icon accordingly.
  • Various CSS fixes.
  • Code health improvements.

0.1.6 - 2019-09-04 #

  • Add a page to show Flutter version and Dart VM flags details.
  • Add settings dialog to memory page that supports filtering snapshots and enabling experiments.
  • Various css fixes.
  • CSS polish for cursors, hover, and misc.
  • Use frame time in CPU profile unavailable message.
  • Fixes to our splitter control.
  • Rev to the latest version of package:vm_service.
  • Remove the dependency on package:mockito.
  • Remove the dependency on package:rxdart.
  • Support sse and sses schemes for connection with a running app.
  • Address an npe in the memory page.
  • Polish button collapsing for small screen widths.
  • Adjust some of the logging flutter.error presentation.
  • Fix thread name bug.
  • Support Ansi color codes in logging views.
  • Add keyboard navigation to the inspector tree view.
  • Enable structured errors by default.
  • Fix NPE in the Debugger.
  • Improve testing on Windows.

0.1.5 - 2019-08-05 #

  • Support expanding or collapsing all values in the Call Tree and Bottom Up views (parts of the CPU profiler).
  • Support touchscreen scrolling and selection in flame charts.
  • Display structured error messages in the Logging view when "show structured errors" is enabled.
  • Search and filter dialogs are now case-insensitive.
  • Link to Dart DevTools documentation from connect screen.
  • Disable unsupported DevTools pages for Dart web apps.
  • Debugger dark mode improvements.

0.1.4 - 2019-07-19 #

  • Add Performance page. This has a traditional CPU profiler for Dart applications.
  • Add ability to specify the profile granularity for the CPU profiler.
  • Bug fixes for DevTools tables, memory page, and cpu profiler.

0.1.3 - 2019-07-11 #

  • Link to new hosted DevTools documentation.
  • Inspector UI improvements.

0.1.2 - 2019-07-01 #

  • Add Call Tree and Bottom Up views to CPU profiler.
  • Pre-fetch CPU profiles so that we have profiling information for every frame in the timeline.
  • Trim Mixins from class name reporting in the CPU profiler.
  • Add searching for a particular class from all active classes in a Snapshot. After a snapshot, use the search button, located to left of snapshot button (or the shortcut CTRL+f ), to find and select the class in the classes list.
  • Add ability to find which class and field hold a reference to the current instance. Hovering on an instance's allocation icon (right-most side of the instance). Clicking on a class/field entry in the hover card will locate that particular class instance that has a reference to the original instance being hovered.
  • Expose hover card navigation via a memory navigation history areas (group of links below the classes/instances lists).
  • Allow DevTools feedback to be submitted when DevTools is not connected to an app.
  • Support URL encoded urls in the connection dialog.
  • Add error handling for analytics.
  • Cleanup warning message presentation.
  • Bug fixes and improvements.

0.1.1 - 2019-05-30 #

  • Make timeline snapshot format compatible with trace viewers such as chrome://tracing.
  • Add ability to import timeline snapshots via drag-and-drop.
  • Memory instance viewer handles all InstanceKind lists.
  • CPU profiler bug fixes and improvements.

0.1.0 - 2019-05-02 #

  • Expose functionality to export timeline trace and CPU profiles.
  • Add "Clear" button to the timeline page.
  • CPU profiler bug fixes and improvements.
  • Inspector polish bug fixes. Handle very deep inspector trees and only show expand-collapse arrows on tree nodes where needed.
  • Fix case where error messages remained on the startup screen after the error had been fixed.
  • Add ability to inspect an instance of a memory object in the memory profiler page after a snapshot of active memory objects.
  • First time DevTools is launched, prompt with an opt-in dialog to report DevTools usage statistics and crash reports of DevTools to Google.

0.0.19 - 2019-05-01 #

  • Update DevTools server to better handle failures when launching browsers.
  • Support additional formats for VM service uris.
  • Link to documentation from --track-widget-creation warning in the Inspector.

0.0.18 - 2019-04-30 #

  • Fix release bug (0.0.17-dev.1 did not include build folder).
  • Add CPU profiler (preview) to timeline page.
  • CPU flame chart UI improvements and bug fixes.
  • Bug fixes for DevTools on Windows.
  • DevTools server released with support for launching DevTools in Chrome.
  • Dark mode improvements.

0.0.16 - 2019-04-17 #

  • Reduce the minimum Dart SDK requirements for activating DevTools to cover Flutter v1.2.1 (Dart v2.1)

0.0.15 - 2019-04-16 #

  • Warn users when they should be using a profile build of their application instead of a debug build.
  • Warn users using Microsoft browsers (IE and Edge) that they should be using Chrome to run DevTools.
  • Dark mode improvements.
  • Open scripts in the debugger using ctrl + o.

0.0.14 - 2019-03-26 #

  • Dark mode is ready to use, add &theme=dark at the end of the URI used to open the DevTool in Chrome. We look forward to your feedback.
  • Added event timeline to memory profiler to track DevTool's Snapshot and Reset events.
  • Timeline CPU renamed to UI, janky defined as UI duration + GPU duration > 16 ms.
  • Timeline frame chart removed 8 ms highwater line, only 16 ms highwater line, display 2 traces ui/gpu (instead of 4). Janky frames will have a red glow.
  • Flame chart colors use a different set of palettes and timeline is sticky.
  • Warn users when they are using an unsupported browser.
  • Properly disable features that aren't supported for the connected application.
  • Fix screens for different widths.

0.0.13 - 2019-03-15 #

  • Dark mode, still being polished, is available. Add &theme=dark at the end of URI used to open DevTools in the Chrome browser.

Memory #

  • Added showing GCs on the timeline and leak detection.

Timeline #

  • Fix bugs when events were received out of order.

0.0.1 #

  • initial (pre-release) release


A simple example app, useful when doing manual testing of the DevTools debugger.

Use this package as an executable

1. Install it

You can install the package from the command line:

$ pub global activate devtools

2. Use it

The package has the following executables:

$ devtools

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  devtools: ^0.1.7

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:devtools/devtools.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Sep 20, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.0
  • pana: 0.12.21


Detected platforms: Flutter, web, other

No platform restriction found in primary library package:devtools/devtools.dart.

Health suggestions

Fix lib/src/ui/fake_flutter/diagnosticable.dart. (-5.36 points)

Analysis of lib/src/ui/fake_flutter/diagnosticable.dart reported 11 hints, including:

line 907 col 13: DO use curly braces for all flow control structures.

line 914 col 57: DO use curly braces for all flow control structures.

line 937 col 17: DO use curly braces for all flow control structures.

line 1138 col 7: DO use curly braces for all flow control structures.

line 1199 col 9: DO use curly braces for all flow control structures.

Fix lib/src/memory/memory.dart. (-0.50 points)

Analysis of lib/src/memory/memory.dart reported 1 hint:

line 943 col 7: DO use curly braces for all flow control structures.

Fix lib/src/memory/memory_inbounds.dart. (-0.50 points)

Analysis of lib/src/memory/memory_inbounds.dart reported 1 hint:

line 172 col 40: DO use curly braces for all flow control structures.

Fix lib/src/memory/memory_service.dart. (-0.50 points)

Analysis of lib/src/memory/memory_service.dart reported 1 hint:

line 238 col 7: DO use curly braces for all flow control structures.

Maintenance issues and suggestions

Support latest dependencies. (-20 points)

The version constraint in pubspec.yaml does not support the latest published versions for 2 dependencies (devtools_server, vm_service).


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.3.0 <3.0.0
ansi_up ^0.0.1 0.0.1+4.0.4
ansicolor ^1.0.2 1.0.2
codemirror ^0.5.10 0.5.10+5.48.4
collection ^1.14.11 1.14.12
devtools_server 0.1.7 0.1.7 0.1.9
http ^0.12.0+1 0.12.0+2
intl ^0.16.0 0.16.0
js ^0.6.1+1 0.6.1+1
meta ^1.1.0 1.1.7
octicons_css ^0.0.1 0.0.1
path ^1.6.0 1.6.4
pedantic ^1.7.0 1.8.0+1
platform_detect ^1.3.5 1.3.5
plotly_js ^0.0.1 0.0.2
polymer_css ^0.0.1 0.0.1
primer_css ^0.0.2 0.0.2
split ^0.0.5 0.0.6
sse ^2.0.0 2.1.1
vm_service ^1.2.0 1.2.0 2.0.0
Transitive dependencies
args 1.5.2
async 2.3.0
browser_launcher 0.1.3
charcode 1.1.2
convert 2.1.1
crypto 2.1.3
http_parser 3.1.3
logging 0.11.3+2
mime 0.9.6+3
pub_semver 1.4.2
shelf 0.7.5
shelf_static 0.2.8
source_span 1.5.5
stack_trace 1.9.3
stream_channel 2.0.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
uuid 2.0.2
Dev dependencies
build_runner ^1.3.0
build_test ^0.10.0
build_web_compilers >=1.2.0 <3.0.0
matcher ^0.12.3
mockito ^4.0.0
test ^1.0.0
webkit_inspection_protocol ^0.5.0 0.5.0