shorebirdtech / shorebird

Code Push for Flutter and other tools for Flutter businesses.
https://shorebird.dev
Other
2.34k stars 141 forks source link

feat: Add a --trace option to `shorebird` for debugging #2568

Open eseidel opened 3 weeks ago

eseidel commented 3 weeks ago

Maybe to try recording a dart vm timeline?

https://dart.googlesource.com/sdk/+/refs/tags/3.3.4/runtime/docs/timeline.md

e.g. something like dart --timeline_recorder=file:mytimeline.json --timeline_streams=VM,Isolate,GC,Dart hello.dart

that would make it very easy for us to grab a trace of execution. Depending on what streams we record we could even have customers collect these for debugging.

eseidel commented 3 weeks ago

You can run shorebird_cli.dart directly in dart run this way, but it might be easier to add --trace or --observe to the shorebird shell wrapper to help that? Not sure.

eseidel commented 3 weeks ago

I guess I wish to be less prescriptive as to the solution, and more that we should figure out ways to help us debug long runtimes/hangs in shorebird, ideally in a way that customers can gather some debug info for us.