flutter / flutter-intellij

Flutter Plugin for IntelliJ
https://flutter.dev/using-ide
BSD 3-Clause "New" or "Revised" License
1.97k stars 316 forks source link

Determine which DevTools windows should allow multiple tabs per tool window #7634

Open helin24 opened 2 weeks ago

helin24 commented 2 weeks ago

Multiple tabs per tool window will appear if there are multiple apps running. This is appropriate for the inspector tool window since each app running could have different widget trees. But I don't think this applies to every page of DevTools, so an audit is appropriate here.

Inspector tool window:

Other DevTools (performance, CPU profiler, memory, etc):

Deep links:

Extensions:

@kenzieschmoll is the above correct? I don't know if we need to prioritize cleaning up multi-app support immediately (as it doesn't seem to be used much), but currently I suspect deep links and extensions should be changed to not append VM service URI.

kenzieschmoll commented 2 weeks ago

Correct: Inspector tool window - Multiple tabs possible, one for each app Correct: Other DevTools (performance, CPU profiler, memory, etc) - Multiple tabs possible, one for each app

Incorrect: Deep links - Only one tab, Should not be associated with an app, i.e. VM service URI should not be appended Incorrect: Extensions - Only one tab, Should not be associated with an app, i.e. VM service URI should not be appended

All of these follow the multiple tabs pattern and can connect to a running app's VM service.

helin24 commented 2 weeks ago

Okay, thanks for clarifying!

This is an example of what we might open for the deep links tool window once an app starts running: http://127.0.0.1:9104/deep-links?ide=Android-Studio&backgroundColor=2b2d30&theme=dark&embedMode=one&fontSize=13.0&ideFeature=toolWindow&uri=http://127.0.0.1:50501/IyPoHwyop3g=

But DevTools then opens to this error:

Screenshot 2024-08-30 at 2 04 04 PM

Is that URI param incorrect?

kenzieschmoll commented 2 weeks ago

What type of app did you run? You may be hitting this: https://github.com/flutter/devtools/issues/8228. That URI looks correct to me.

helin24 commented 1 week ago

What type of app did you run? You may be hitting this: flutter/devtools#8228. That URI looks correct to me.

Ah yes, I am hitting that problem. I'll test this out on an Android device instead.