Giter Club home page Giter Club logo

devtools's Introduction

Dart & Flutter DevTools

Build Status OpenSSF Scorecard

What is this?

Dart & Flutter DevTools is a suite of performance tools for Dart and Flutter.

Getting started

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

Contributing and development

Contributions welcome! See our contributing page for an overview of how to build and contribute to the project.

Terms and Privacy

By using Dart DevTools, you agree to the Google Terms of Service. To understand how we use data collected from this service, see the Google Privacy Policy.

devtools's People

Contributors

alexlindroos avatar bkonyi avatar bleroux avatar carolynqu avatar chunhtai avatar coderdake avatar dantup avatar dartdevtoolworkflowbot avatar daveshuckerow avatar dependabot[bot] avatar devoncarew avatar elliette avatar gmoothart avatar grouma avatar hangyujin avatar helin24 avatar jacob314 avatar jonahwilliams avatar kenzieschmoll avatar kevmoo avatar matt-ragonese avatar migueltylee avatar natebosch avatar parlough avatar peterdjlee avatar polina-c avatar rrousselgit avatar srawlins avatar srujzs avatar terrylucas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

devtools's Issues

Test debugging from IntelliJ broken

Debugging integration_test.dart from IntelliJ fails to connect to observatory.

Running the test from IntelliJ works fine. It also runs successfully from command line using both dart test/integration_test.dart as well as pub run test/integration_test.dart.

When debugging, output of stdout from WebdevFixture.create()

Observatory server failed to start after 1 tries
Observatory server failed to start after 2 tries
...
Observatory server failed to start after 11 tries
Could not start Observatory HTTP server:
SocketException: Failed to create server socket (OS Error: Address already in use, errno = 48), address = localhost, port = 57412
#0      _NativeSocket.bind (dart:io/runtime/binsocket_patch.dart:573:7)
<asynchronous suspension>
#1      _RawServerSocket.bind (dart:io/runtime/binsocket_patch.dart:1166:26)
#2      _ServerSocket.bind (dart:io/runtime/binsocket_patch.dart:1422:29)
#3      ServerSocket.bind (dart:io/runtime/binsocket_patch.dart:1413:26)
#4      _HttpServer.bind (dart:_http/http_impl.dart:2524:25)
#5      HttpServer.bind (dart:_http:364:19)
#6      Server.startup.poll (dart:vmservice_io/server.dart:352:36)
<asynchronous suspension>
#7      Server.startup (dart:vmservice_io/server.dart:364:23)
<asynchronous suspension>
#8      main (dart:vmservice_io:253:12)

when the application is paused at a breakpoint, we should clearly indicate this globally in the UI

When the application is paused at a breakpoint (or at an exception, or while stepping), we should clearly indicate this globally in the UI. Otherwise user's may interact with the app under debug and not be aware of why the UI is not responding.

Some options for indicating the paused state are a full width stripe across the top of the app, and / or a badge on the title of the 'Debugger' tab.

Support reviewing history for the logging screen

There's currently no visual change in the logging page when we lose the device connection. We should make sure there is (put a subtle transparent overlay on the logging items?), and do something similar on the other pages as well.

Support light and dark themes

We should start supporting both light and dark themes for all our UI sooner rather than later so it is less work to refactor later.
VS Code and Android Studio users tend to use a dark theme so having a dark theme will make the devtool tool feel more consistent.

speed up infra bots

Our bots take 5-6 mins to run now. We should do some investigation, to either speed them up, or shard them into more bots. It'd be nice to get the cycle time down to 2-4 minutes.

Events being lost from stream?

If I uncomment the code to call _loadHeapSnapshot and run it, it seems like we don't process ever other frame of data from the stream (and therefore never complete). Testing with iOS Simulator, flutter_gallery (last pulled yesterday):

screen shot 2018-10-02 at 12 19 12 pm
screen shot 2018-10-02 at 12 18 55 pm

As far as I can tell, this shows all 6 packages coming over the WS, but we only fired events for 3 of them.

remove unneeded delays in test execution

The PR (#93) to deflake the integration tests introduced several delays, not all of which are likely necessary. We should remove the ones we find aren't necessary - this will recapture 1-2 seconds of test execution time per test.

Wire up the analyzer server to the devtools client

There are cases such as displaying doc comments, autocompleting expressions, and getting types where having access to the analyzer service is needed.

TBD: the most robust way to wire up the analyzer to the web app. IDEs such as VSCode already have an analyzer service running but command line users do not.

speed up the flutter bot

Our flutter test bot takes ~6 mins to run. We should in investigate downloading one of the pre-built flutter sdk zip files to see if that's a faster way to provision the flutter sdk.

"NoSuchMethodError: method not found: 'call'" in pre-built app

This happens when I launch the tools (so possibly the inspector view?). It only happens in the pre-built version, not if I run webdev serve (so maybe caused by a difference between DDC/dart2js?).

[{"event":"app.inited"}]
main.dart.js:1358 Uncaught Error: NoSuchMethodError: method not found: 'call'
Receiver: Closure 'minified:D5'
Arguments: ["width", 35, 6, null]
    at Object.k (main.dart.js:1358)
    at D5.dart.h.it (main.dart.js:5849)
    at Object.J.p9 (main.dart.js:18364)
    at Object.lG (main.dart.js:1321)
    at Object.wz (main.dart.js:1332)
    at Object.wB (main.dart.js:1327)
    at Object.l6 (main.dart.js:5173)
    at dart.BP (main.dart.js:7611)
    at main.dart.js:7606
    at w (split.min.js:2)

screenshot 2019-01-30 at 9 42 28 am

P1: Badge tabs with red dot / count for errors

When the logging page is not active, and we receive framework error messages, we should badge the 'Logging' page with the number of framework error messages received. This will indicate to the user that there are messages in the logging view that they may want to see. When the logging view next becomes active, the badge count on that page can be cleared out.

screen shot 2019-01-26 at 6 04 49 pm

screen shot 2019-01-26 at 6 05 33 pm

Scrolling logging table with cursor keys feels laggy

If you click in the logging table and press and hold up or down, the selected row quickly disappears off the screen and the scrolling doesn't keep up with it. When you let go, it quickly slides to the correct position.

This may be a similar problem to that described here:

// Smooth scroll if we havent scrolled in a while, otherwise use an
// immediate scroll because repeatedly smooth scrolling on the web means
// you never reach your destination.
final DateTime now = DateTime.now();
final bool smoothScroll = _lastScrollTime == null ||
_lastScrollTime.difference(now).inSeconds > 1;
_lastScrollTime = now;
loggingTable.scrollTo(data.last,
scrollBehavior: smoothScroll ? 'smooth' : 'auto');

However that fix applies only to adding new rows, whereas this is just scrolling the existing rows by moving the selection.

Add an inspector page

Match functionality of intellij inspector. Write code so it is straightforward to port to Hummingbird.

"Cannot add breakpoint" error when clicking to add on blank line

(Not sure if it matters, but I found this when running from a pre-build JS version)

When I click the Debugger tab then try to add a breakpoint on a blank line, I get a JS error (I'm not sure if this tab is supposed to be hidden right now though?).

dart_sdk.js:4858 Uncaught vm_service_lib.RPCError.new {Symbol(RPCError.callingMethod): "addBreakpoint", Symbol(RPCError.code): 102, Symbol(RPCError.message): "Cannot add breakpoint", Symbol(RPCError.data): c…t._…p.new, Symbol(_error): Error
    at Object.dart.throw (http://localhost:8765/packages/$sdk/dev_compiler/amd/dart_sdk.js:485…}Symbol(RPCError.callingMethod): "addBreakpoint"Symbol(RPCError.code): 102Symbol(RPCError.data): convert._JsonMap.new {Symbol(_processed): {…}, Symbol(_data): null, Symbol(_original): {…}}Symbol(RPCError.message): "Cannot add breakpoint"Symbol(_error): Error
    at Object.dart.throw (http://localhost:8765/packages/$sdk/dev_compiler/amd/dart_sdk.js:4857:29)
    at async._AsyncCallbackEntry.new.async._schedulePriorityAsyncCallback.dart.fn [as callback] (http://localhost:8765/packages/$sdk/dev_compiler/amd/dart_sdk.js:27736:41)
    at Object.async._microtaskLoop (http://localhost:8765/packages/$sdk/dev_compiler/amd/dart_sdk.js:24434:13)
    at async._startMicrotaskLoop (http://localhost:8765/packages/$sdk/dev_compiler/amd/dart_sdk.js:24440:13)
    at MutationObserver.internalCallback (http://localhost:8765/packages/$sdk/dev_compiler/amd/dart_sdk.js:24510:11)callingMethod: (...)code: (...)data: (...)details: (...)hashCode: (...)message: (...)runtimeType: (...)Symbol(dartx.hashCode): (...)Symbol(dartx.runtimeType): (...)__proto__: Object
dart.throw @ dart_sdk.js:4858
async._schedulePriorityAsyncCallback.dart.fn @ dart_sdk.js:27736
async._microtaskLoop @ dart_sdk.js:24434
async._startMicrotaskLoop @ dart_sdk.js:24440
internalCallback @ dart_sdk.js:24510
childList (async)
dart.fn.callback @ dart_sdk.js:24520
_scheduleImmediate @ dart_sdk.js:24496
async._scheduleAsyncCallback @ dart_sdk.js:24454
async._rootScheduleMicrotask @ dart_sdk.js:27793
async.scheduleMicrotask @ dart_sdk.js:24484
schedule @ dart_sdk.js:25408
[_addPending] @ dart_sdk.js:22411
[_sendData] @ dart_sdk.js:25144
[_add] @ dart_sdk.js:24935
add @ dart_sdk.js:24903
stream.listen.dart.fn.e @ service.dart:65
dart._checkAndCall @ dart_sdk.js:4668
dart.dcall @ dart_sdk.js:4673
(anonymous function).html$._wrapZone.dart.fn.e @ dart_sdk.js:96928

build_runner serve web fails when using Flutter's version of pub

What I'm doing here might not be very supported, but since the behaviour seemed strange I thought it was worth raising.

When VS Code has a Flutter project open it always uses the Dart SDK from the Flutter SDK. This means if we want to pub run build_runner watch this (I know we probably want webdev, but this was already here so I tried it) it'll use Flutter's version. I noticed a weird discrepancy when running pub run build_runner serve web using this version of pub versus Dart v2.1 (the Dart one works, the Flutter one does not).

I don't know if this is an expected difference because it's in Flutter, or if something changed/broke between v2.1 and vMaster of Dart.

Dart v2.1

dantup-macbookpro:devtools dantup$ which pub
/Users/dantup/Dev/dart-sdk/v2.1/bin/pub

dantup-macbookpro:devtools dantup$ pub run build_runner serve web
[INFO] Generating build script completed, took 293ms
[INFO] Setting up file watchers completed, took 17ms
[INFO] Waiting for all file watchers to be ready completed, took 203ms
[INFO] Reading cached asset graph completed, took 383ms
[INFO] Checking for updates since last build completed, took 573ms
[INFO] Running build completed, took 15.8s
[INFO] Caching finalized dependency graph completed, took 170ms
[INFO] Succeeded after 16.0s with 217 outputs (151 actions)
Serving `web` on http://localhost:8080

Flutter (master)

dantup-macbookpro:devtools dantup$ /Users/dantup/Dev/Google/flutter/bin/cache/dart-sdk/bin/pub run build_runner serve web
[INFO] Generating build script completed, took 366ms
[INFO] Setting up file watchers completed, took 21ms
[INFO] Waiting for all file watchers to be ready completed, took 204ms
[WARNING] Throwing away cached asset graph due to Dart SDK update.
[INFO] Cleaning up outputs from previous builds. completed, took 229ms
[INFO] Reading cached asset graph completed, took 576ms
[INFO] Building new asset graph completed, took 1.2s
[INFO] Checking for unexpected pre-existing outputs. completed, took 1ms
[WARNING] build_modules|dartdevc on lib/.dartdevc.meta_module.raw:
Unable to read module information for package:flutter, make sure you have a dependency on it in your pubspec.
[SEVERE] build_web_compilers|ddc on package:vm_service_lib/vm_service_lib.dartdevc.module:

ProcessException: No such file or directory
  Command: /Users/dantup/Dev/Google/flutter/bin/cache/dart-sdk/bin/dartdevc --persistent_worker
[SEVERE] build_web_compilers|ddc on package:meta/meta.dartdevc.module:

ProcessException: No such file or directory
  Command: /Users/dantup/Dev/Google/flutter/bin/cache/dart-sdk/bin/dartdevc --persistent_worker
[SEVERE] build_web_compilers|ddc on package:intl/number_symbols.dartdevc.module:

ProcessException: No such file or directory
  Command: /Users/dantup/Dev/Google/flutter/bin/cache/dart-sdk/bin/dartdevc --persistent_worker
[SEVERE] build_web_compilers|ddc on package:intl/date_symbols.dartdevc.module:

ProcessException: No such file or directory
  Command: /Users/dantup/Dev/Google/flutter/bin/cache/dart-sdk/bin/dartdevc --persistent_worker
[WARNING] build_web_compilers|entrypoint on web/main.dart:
Unable to read intl|lib/date_symbols.ddc.js, check your console or the `.dart_tool/build/generated/intl/lib/date_symbols.ddc.js.errors` log file.
[WARNING] build_web_compilers|entrypoint on web/main.dart:
Unable to read vm_service_lib|lib/vm_service_lib.ddc.js, check your console or the `.dart_tool/build/generated/vm_service_lib/lib/vm_service_lib.ddc.js.errors` log file.
[WARNING] build_web_compilers|entrypoint on web/main.dart:
Unable to read intl|lib/number_symbols.ddc.js, check your console or the `.dart_tool/build/generated/intl/lib/number_symbols.ddc.js.errors` log file.
[WARNING] build_web_compilers|entrypoint on web/main.dart:
Unable to read meta|lib/meta.ddc.js, check your console or the `.dart_tool/build/generated/meta/lib/meta.ddc.js.errors` log file.
[WARNING] No actions completed for 15.1s, waiting on:
  - build_web_compilers|ddc on package:path/path.dartdevc.module
  - build_web_compilers|ddc on package:intl/number_symbols_data.dartdevc.module
  - build_web_compilers|ddc on package:intl/src/plural_rules.dartdevc.module
  - build_web_compilers|ddc on package:intl/intl.dartdevc.module
  - build_web_compilers|ddc on package:collection/src/utils.dartdevc.module
  .. and 12 more

[WARNING] No actions completed for 15.1s, waiting on:
  - build_web_compilers|ddc on package:path/path.dartdevc.module
  - build_web_compilers|ddc on package:intl/number_symbols_data.dartdevc.module
  - build_web_compilers|ddc on package:intl/src/plural_rules.dartdevc.module
  - build_web_compilers|ddc on package:intl/intl.dartdevc.module
  - build_web_compilers|ddc on package:collection/src/utils.dartdevc.module
  .. and 12 more

@devoncarew @jacob314

"Last" frame in timeline is not last and never moves

I'm not I totally understand the relationship between the top graph and the list of frames here, but when my app is rendering frames the very last box here (1.7ms / 16.6ms) never moves - all the others scroll to the left but it seems like one (the first frame?) is stuck to the end of the list.

screenshot 2019-01-24 at 11 37 29 am

logging table scroll position reset on page change

If you scroll in the logging table, switch to a different page, and switch back to the logging page, the scroll position is reset to the top of the table.

We'll want to retain the scrolling position as if the user hadn't switched away from the page. That's either the current scroll position, or the bottom of the table if any logging output had been received when it was off screen.

Make frames in the live chart clickable?

@devoncarew It feels a bit weird (frustrating, even) that we can't click frames in the live chart, and it seems like there's a lot of overlap with the frames shown underneath.

Could we make these clickable, or even maybe combine the two? For ex. we could split the bars in the live chart into two colours (for GPU/Dart) and add a tooltip with the numbers and show the selection in the live chart.

Keyboard navigation to move left/right would be neat too :-)

(I don't know how easy it'll be to figure out the frame under the mouse from the coordinate clicks given it's canvas, but if we think this'd be a good change I'm happy to have a go).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.