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

DTD workspace roots not getting set #7616

Open kenzieschmoll opened 3 weeks ago

kenzieschmoll commented 3 weeks ago

I noticed this because the extensions view was empty for an IntelliJ project that should have DevTools extensions (due to the dependencies on the provider and flame packages). Screenshot 2024-08-20 at 9 26 32 AM

From DevTools verbose logging, we can see that the project roots are empty:

{"level":"FINE","message":"[from devtools_server] ExtensionsManager.serveAvailableExtensions adding extensions for DTD project roots: []","timestamp":"2024-08-20 16:27:09.684Z","loggerName":"devtools_server_client"}

I tried invalidating caches and restarting IntelliJ, but encountered the same problem. Let me know if there are any logs I can collect from IntelliJ that would be helpful.

helin24 commented 3 weeks ago

What's the timing for when you're opening DevTools? I suspect what's happening is there's a delay in the workspace roots being set from the Dart plugin, so opening an instance of DevTools app early on will show no roots available. I'm able to reproduce opening Android Studio, opening DevTools immediately and seeing no roots, then waiting a while and opening DevTools again and seeing roots.

This is still problematic for the DevTools tool windows since some will be loaded immediately, so being able to reload from the tool window will be useful (https://github.com/flutter/flutter-intellij/issues/7617). Alternatively, can DevTools detect if roots are set later on?