flutter-intellij icon indicating copy to clipboard operation
flutter-intellij copied to clipboard

Embed more DevTools screens inside IntelliJ / Android Studio

Open kenzieschmoll opened this issue 1 year ago • 2 comments

Right now, the only DevTools screen that is embeddable in IntelliJ is the Flutter Inspector. This is very minimal support compared to VS code, which allows every DevTools screen to be embedded, including the Flutter sidebar and static tools like the new Deep Links tool.

Adding an IntelliJ tooling window for every DevTools screen does not seem like the right solution, since this would be crowded and busy. However, having up to 4 or 5 tool windows for Dart and Flutter seems reasonable and could allow us to embed more tooling. To keep the number of tooling windows low, we could group some DevTools screens together in a single tool window where it makes sense (navigable by tab bar or drop down or something). Some ideas for logical groupings:

  • Inspector (already supported)
    • queryParam for DevTools URI: embedMode=one
  • deep links (P1) - https://github.com/flutter/flutter-intellij/issues/7298
    • queryParam for DevTools URI: embedMode=one
  • Flutter DevTools (P1)
    • contains all screens that are not broken out into their own tool window
    • queryParam for DevTools URI: embedMode=many&hide=home,inspector,deep-links,extensions
  • DevTools extensions
    • queryParam for DevTools URI: embedMode=many&hide=all-except-extensions
  • Flutter sidebar (P2 since this needs some design) - https://github.com/flutter/flutter-intellij/issues/7299
    • queryParam for DevTools URI: embedMode=one

Among its other functions like selecting a device or viewing debug sessions, the flutter sidebar will allow users to open any other DevTools screen (this should open the embedded screen in its respective tool window) as well as open DevTools in the browser.

This will need to be gated on a version of Flutter that supports the DevTools changes.

kenzieschmoll avatar Jan 31 '24 20:01 kenzieschmoll

Do extensions generally connect to the VM service?

For an embedded view of extensions, I'm imagining that:

  1. If a user opens extensions without running an app, there could be some static content
  2. If a user starts an app, we should then update the DevTools address with the VM service URL so that extensions using it will be refreshed with the connection

(This is how the performance and other pages work currently)

helin24 avatar Jun 07 '24 21:06 helin24

Do extensions generally connect to the VM service?

Most do. Static extensions (ones that do not require a running app) are also supported. DevTools manages whether to show or hide these based on what is available for the current project.

For an embedded view of extensions, I'm imagining that:

  1. If a user opens extensions without running an app, there could be some static content
  2. If a user starts an app, we should then update the DevTools address with the VM service URL so that extensions using it will be refreshed with the connection (This is how the performance and other pages work currently)

Yes this sounds correct. The one thing that we will need to think of here is how to handle multiple debug sessions. I expect we should handle this like we do for the Inspector tool window.

kenzieschmoll avatar Jun 10 '24 18:06 kenzieschmoll

closing as completed since adding the Flutter sidebar to IntelliJ is tracked separately.

kenzieschmoll avatar Jul 30 '24 20:07 kenzieschmoll