devtools icon indicating copy to clipboard operation
devtools copied to clipboard

Flutter Inspector does not have isolate selector

Open fertrig opened this issue 2 years ago • 2 comments

We have a desktop application which launches two flutter windows. Each flutter window is its own isolate. When we launch DevTools for the application, the Flutter Inspector only shows the widget tree of one of the windows. We are not able to select the widget tree of the other Flutter isolate.

Is there a way to select which Flutter isolate to show in the Flutter Inspector?

fertrig avatar Jul 27 '22 19:07 fertrig

Thanks for the feature request. We have the framework in place already to add the isolate selector to the Inspector (it is on the footer of some other pages). @jacob314 are there implications of this regarding pub root directories that we need to be aware of? I'm guessing we'd need to find the main library for each isolate and use that directory as the pub root?

kenzieschmoll avatar Jul 28 '22 22:07 kenzieschmoll

Wow didn't realize this was possible! A bunch of the tooling is going to be confused as your app has two UI isolates. Most of our tooling is assuming the concept of a main isolate which is wrong for your use case. For example, I expect the performance page is also showing only frames from one of your apps.

We'd need to set the pub root directories for each isolate. We'd also need to inspect all of the inspector_service to tweak it to use the selected isolate rather than the main isolate everywhere. We might want to add a concept of multiple UI isolates. The isolate selector for the inspector should only really let you toggle between the different UI isolates.

jacob314 avatar Jul 28 '22 23:07 jacob314