flutter / devtools

Performance tools for Flutter
https://flutter.dev/docs/development/tools/devtools/
BSD 3-Clause "New" or "Revised" License
1.58k stars 324 forks source link

Inspector does not show widget tree when started in IDE, with multiple pub root folders. #4371

Open polina-c opened 2 years ago

polina-c commented 2 years ago
  1. Open DevTools's folder packages in Android Studio
  2. Click button 'Debug' on top for macos device and configuration 'DevTools'
  3. Click DevTools button in Android Studio to open second DevTools
  4. Find that devtools Inspector screen toes not show the tree
  5. Click the button 'hot reload' in the second DevTools and find the tree appeared and disappeared.
Flutter 3.1.0-0.0.pre.2255 • channel master • https://github.com/flutter/flutter.git
Framework • revision a85902aa32 (2 hours ago) • 2022-08-12 14:28:55 -0400
Engine • revision c354e0e04c
Tools • Dart 2.19.0 (build 2.19.0-93.0.dev) • DevTools 2.16.0

https://user-images.githubusercontent.com/12115586/184468306-9df99a29-a682-4fd2-ab63-8a261777aa7f.mov

kenzieschmoll commented 2 years ago

Sounds like this may be an issue with opening a mono-repo (where there is more than one package in the IJ project) @stevemessick @helin24.

@DanTup does VS code handle this case well?

@CoderDake here is an example of a failure case we want to track with analytics (when the tree loads with a single node [root]

stevemessick commented 2 years ago

The Flutter plugin recently added support for monorepos: https://groups.google.com/g/flutter-announce/c/on6eKqmhD3A

DanTup commented 2 years ago

@DanTup does VS code handle this case well?

I believe so. It looks like the issue described in https://github.com/Dart-Code/Dart-Code/issues/3210 which was fixed by ensuring we pass all projects to the call to setPubRootDirectories (as arg0, arg1 ... argN).

kenzieschmoll commented 1 year ago

@CoderDake is this still relevant with the work you did on ensuring pub root directories are properly set?