Skip to content

Provide profile, hotreload buttons for non-flutter debugging #3715

Closed

Description

@bsutton

When debugging a flutter app (been a while) you get a number of extra options in the debug toolbar that opens.

We don't get these some options when debugging dart code.

It would be nice to have easy access to hot reload, open dev tools and the ability to launch a profile.

Dart code v3.29

Activity

  1. added
    is enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.
    on Dec 7, 2021
  2. added this to the v3.30.0 milestone on Dec 8, 2021
  3. added
    in dartRelates to running Dart programs
    in debuggingRelates to the debug adapter or process of running debug sessions
    on Dec 8, 2021
  4. DanTup commented on Dec 9, 2021

    @DanTup
    Member

    Screenshot 2021-12-09 at 14 02 23

    For Flutter we don't actually have a button to jump to the CPU Profiler, it goes to the Performance page. However I've used the same icon for CPU Profiler (since the Performance page is Flutter-specific) for non-Flutter sessions because I don't want to clutter the toolbar too much (eg. adding CPU Profile also for Flutter) or have to find different icons for "CPU Profiler" vs "Performance".

  5. bsutton commented on Dec 9, 2021

    @bsutton
    Author

    for non-Flutter sessions because I don't want to clutter the toolbar too much

    The icon and target page are find. I was actually referring to memory profiling but I'm happy to have it go to the cpu profile page.

  6. DanTup commented on Dec 13, 2021

    @DanTup
    Member

    There was a pre-release build today if you want to switch to try out these new features/fixes in advance of a stable release:

    Screenshot 2021-12-13 at 18 42 15

  7. bsutton commented on Dec 14, 2021

    @bsutton
    Author

    Dan thanks for the work.

    A couple of issues.

    1. I was expecting to see the profiler launch in a separate window.
      I run a two screen system and would normally move the profiler to a different screen so I can see my full dev environment.
      Having the screen embedded in vscode precludes this.

    2. the launcher only opens the cpu profile window.
      I was expecting to see the full suite of devtool windows (e.g. the memory profiler).

  8. bsutton commented on Dec 14, 2021

    @bsutton
    Author

    Scenario:
    run a debug session, stop it and then run a second debug session

    Click the dev tool button.
    The tool shows a menu showing the current and last (stopped) session.
    Is this intentional?

    If it is then I think the order is incorrect. It shows the older session first which is also highlighted in blue.
    If we are going to have both then it should have the current session highlighted and it should probably be the first one in the list.

  9. DanTup commented on Dec 14, 2021

    @DanTup
    Member

    I was expecting to see the profiler launch in a separate window.

    This is controlled by the dart.embedDevTools setting. It defaults to embedded, but if you set it to false it'll open the full DevTools (with nav so you can move around) in the browser.

    The tool shows a menu showing the current and last (stopped) session.
    Is this intentional?

    Nope, that sounds like a bug that the previous session stopping wasn't handled correctly - I'll take a look. Thanks!

  10. DanTup commented on Dec 14, 2021

    @DanTup
    Member

    Nope, that sounds like a bug that the previous session stopping wasn't handled correctly - I'll take a look. Thanks!

    I don't seem to be able to repro this. If you still can, could you file a new issue with more details about exactly what you're running, etc. - and whether you see "Exited" in the Debug Console for the first session before this occurs?

    Capturing logs (with Dart: Capture Logs and leaving everything except Analysis Server ticked) across both sessions may be useful too. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    in dartRelates to running Dart programsin debuggingRelates to the debug adapter or process of running debug sessionsis enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions