Repository navigation
[Experiment] Support embedding DevTools in the sidebar #5396
Copy link
Copy link
Closed
Labels
in devtoolsRelates to integration with Dart/Flutter DevToolsRelates to integration with Dart/Flutter DevToolsis enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.An enhancement or improvement that should be listed in release notes but is not a bug fix.
Milestone
Description
I thought there was an open issue for this but I can't find it, so opening this one.
There is work in-progress to test out embedding DevTools in sidebar panels instead of editors. It's currently blocked on microsoft/vscode#236494 because that causes us to "restore" bad URLs into the iframes when they load.
TODO:
- Opening the sidebar before starting a debug session causes it to try to connect to the last session (because of restoring context... we want this to support "Reload WebViews" but probably don't want it to persist over sessions)
This may be a VS Code issue -> WebView state unexpectedly persists across sessions without a WebviewPanelSerializer microsoft/vscode#236494 -
Performance feels much worse when resizing the sidebar compared to an editor viewdoesn't repro now -
Sometimes Flutter throws an error and stops renderingwasm issue, not related to this - Decide what should show in the sidebar panels when there's no debug session (or after ending a debug session)
- How to handle multiple debug sessions (we can have multiple editor windows, but not editor sidebars)
- Use contexts to ensure side panels only show up for the sections set to
sidebar- shown only on first use for now - Add unique icons to each view so if they're dragged out to their own section in the activity bar they have different icons
- if you drag them all out, the remaining item in the original container still keeps the Flutter icon
- Add a unique DevTools icon instead of using the Flutter one
- After closing a debug session then re-launching, when it should be re-connected, it opens a standard embedded window
- Support opening directly from the sidebar without having to use commands
- Having all pages loaded in sidebar results in connection limit: Unable to open too many DevTools pages due to browser per-host connection limit being exhausted by SSE connections flutter/devtools#8298
- Should we only support sidebar for some?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
in devtoolsRelates to integration with Dart/Flutter DevToolsRelates to integration with Dart/Flutter DevToolsis enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.An enhancement or improvement that should be listed in release notes but is not a bug fix.
Activity
DanTup commentedon Feb 20, 2025
Currently blocked on microsoft/vscode#240207Worked aroundDanTup commentedon Feb 26, 2025
This is available as an experiment in the current pre-release of Dart-Code (
v3.105.20250225). There are a number of things outstanding (see checklist at the top of this issue). Personally, I think the inspector works better here than I was expecting, but I'm not sure if that will be true for all of the pages (for example performance view/profiler).To try it out:
Currently you'll have to launch the DevTools pages using the existing commands/buttons for the sidebar entries to show up, but ultimately we should be able to have them show up (and just load them the first time you view/expand them). They'll go into a new sidebar section called "Flutter DevTools" which right now has the same icon as the existing Flutter section (for Outline/Sidebar). You can drag the individual sections (Inspector, Memory etc.) out to the sidebar but again, they'll currently show the same icon (they could eventually have their own icons).
Feedback appreciated!
Update icons for DevTools sidebar
DanTup commentedon Mar 19, 2025
I've pushed some changes (in a new pre-release dated today) so that the sidebar icons can show up always now (if you have the experiment flag, and for the sections that are set to "sidebar" as their location), rather than only after you launch the tool through a command/button. This feels much better and should improve visibility of more of these tools.
The Inspector and Deep Links have their own sections, the others are in a "DevTools" section (icon is outstanding).
There are still some rough edges, but I think it's in a good place to get more feedback (fyi @kenzieschmoll @elliette @jwren @loic-sharma )
DanTup commentedon Mar 31, 2025
This experiment will ship (still behind experiment flags) in the upcoming release. I've opened #5469 to track/discuss making it non-experimental if/when we're happy it works well enough.
[-]Support embedding DevTools in the sidebar[/-][+][Experiment] Support embedding DevTools in the sidebar[/+]