Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
bsutton opened this issue Dec 7, 2021 · 7 comments
Closed

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

bsutton opened this issue Dec 7, 2021 · 7 comments
Labels
in cli Relates to running Dart CLI scripts in debugger Relates to the debug adapter or process of launching a debug session is enhancement
Milestone

Comments

@bsutton
Copy link

bsutton commented Dec 7, 2021

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

@DanTup DanTup added this to the v3.30.0 milestone Dec 8, 2021
@DanTup DanTup added in cli Relates to running Dart CLI scripts in debugger Relates to the debug adapter or process of launching a debug session labels Dec 8, 2021
@DanTup
Copy link
Member

DanTup commented Dec 9, 2021

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".

@bsutton
Copy link
Author

bsutton commented Dec 9, 2021

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.

@DanTup
Copy link
Member

DanTup commented Dec 13, 2021

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

@bsutton
Copy link
Author

bsutton commented Dec 14, 2021

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).

@bsutton
Copy link
Author

bsutton commented Dec 14, 2021

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.

@DanTup
Copy link
Member

DanTup commented Dec 14, 2021

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!

@DanTup
Copy link
Member

DanTup commented Dec 14, 2021

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
Labels
in cli Relates to running Dart CLI scripts in debugger Relates to the debug adapter or process of launching a debug session is enhancement
Projects
None yet
Development

No branches or pull requests

2 participants