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

Consider supporting an online "upgrade" experience when embedded in an IDE #8229

Open
kenzieschmoll opened this issue Aug 22, 2024 · 1 comment
Labels
ide-integration P2 important to work on, but not at the top of the work list.

Comments

@kenzieschmoll
Copy link
Member

In this scenario, I opened the Performance page in VS code when no debug sessions were available. This opened up the Performance screen for the "disconnected" state which allows the user to load offline data. I later ran a debug session, and still had the "offline" version of the Performance page.

It would be nice if a small banner popped up at the top of my performance tool that said something like
"A debug session is now available. Would you like to reload this tool and connect to it?". At that point the user could choose whether to ignore the message and continue looking at the offline data or reload the tool with the new app connection.

If the user chose to reload, DevTools could refresh itself so that the embedded IDE view would be reloaded. This would require the IDE to send an event to DevTools debug sessions change, and I think this event already exists because of the Flutter sidebar.

CC @DanTup @helin24

@kenzieschmoll kenzieschmoll added ide-integration P2 important to work on, but not at the top of the work list. labels Aug 22, 2024
@DanTup
Copy link
Contributor

DanTup commented Aug 27, 2024

This would require the IDE to send an event to DevTools debug sessions change, and I think this event already exists because of the Flutter sidebar.

Yep, it does - we send events when a new debug session starts (although at that point it might not have a VM Service yet), and then when they change (eg. the VM service becomes available).

So if DevTools (not just the sidebar) listened for those events, it could know that a session just got a VM Service URI and show this kind of prompt. You'd probably need to keep the state of the sessions though to ensure you know when the "debug session changed" event was specifically adding a VM Service URI (and not changing for some other reason).

Similarly, when the VM Service closes, the page could downgrade back to the offline mode (or showing last captured data, or whatever is relevant for the specific page).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ide-integration P2 important to work on, but not at the top of the work list.
Projects
None yet
Development

No branches or pull requests

2 participants