Closed simc closed 1 year ago
Few use cases
The use cases are legion tbh, any kind of inspection of state is useful there. whatever state.
I would also like the possibility to have extension, but if that's not planned if there was a message bus mechanism where one could start another app that connects to that bus and display the required information with a desktop app it would be nice.
Let me rephrase this, if extensions is not planned, it would be nice to have the ability to:
Certainly this is doable today but my guess is that the process will be too involved (development wise) to not be solving 2 problems (making the extension + make a communication mechanism).
It would even be helpful to allow third parties to access an active debugging session without requiring the user to find the websocket link in the logs.
My use cases:
@kenzieschmoll Is there something we could help with to make this happen? Or are there alternatives? Riverpod and Provider are integrated into devtools. Can anyone submit an extension?
Here's a link to our in progress design on supporting Flutter DevTools Plugins. Comments appreciated! https://docs.google.com/document/d/1BWX8YQ962Vsx-EUDuDHRG7RX94fJlZSDRu299YRwasE/edit
@jacob314 Wow that is incredible 😍 can't wait to build some plugins
:wave: Out of curiosity, when could this be made available and is there anything we can do to help? :pray:
I'm asking because I'm honestly considering making my own plugin mechanism through a custom VScode extension which would allow folks to contribute tabs.
I was considering a VScode extension because it enables the plugin mechanism to access the full VScode API.
So plugins could provide custom commands or implement their own "open a file at a given offset".
But if we're going to have plugins in a reasonable timeframe, this project may not be worth it anymore (since an official solution would have a bigger reach)
@kenzieschmoll is in the process of kicking this effort back off. VSCode API integration is interesting and we have use cases like editing Flutter widget properties where that would be helpful as well. It would be great to have you collaborate on the implementation of the official solution for this.
It's a bit unclear to me on what I could do to help. Do you have anything more specific?
Honestly, I wouldn't mind contributing to various aspects of the plugin mechanism. VScode API or not.
Hi @rrousselGit. I'm going to prioritize working on this design. I will keep you posted when I have some more specific details to share. Thanks!
The design for this feature is out for review:
Related:
I've been working on a prototype to provide a proof of concept for the above designs.
Screencast link: https://screencast.googleplex.com/cast/NTk2MzgyOTQ4MjYxODg4MHxiODFhYjFiOC0yNA Or watch video: DevTools Plugins Prototype.webm
This work is subject to change and needs a lot of cleanup, but early & rough prototype available with the combination of the following changes:
For testing, I am running app_that_uses_foo
from here, which imports the foo_package
from the same repo: https://github.com/kenzieschmoll/test_apps/tree/main/tooling_plugins, and I am connecting that app to devtools, built and served with dart devtools/tool/build_e2e.dart
.
Note: for this to work properly, the app_that_uses_foo/.dart_tool/package_config.json
entry for "foo_package" needs to use an absolute path, not a relative one:
{
"name": "foo_package",
"rootUri": "../../foo_package", // Change to an absolute path
"packageUri": "lib/",
"languageVersion": "3.1"
},
open questions / edge cases to consider
package:extension_discovery
? @jonasfj Initial draft for a package:extension_discovery
in https://github.com/dart-lang/tools/pull/129
Cool! Tell me whenever there's something I can play with :)
This work has landed! Anyone wanting to write a DevTools extension should follow the instructions at https://pub.dev/packages/devtools_extensions. Extension support in DevTools just landed in the Dart SDK and should be available on Flutter master by the end of the week. This will be included in the next Flutter beta and stable releases. In the meantime, you can still develop your extension using the simulated DevTools environment described in the instructions.
package:provider
has already published a DevTools extension for version 6.1.0-dev.1.
We are working on setting up a Discord channel specific to DevTools extension authors, but in the meantime you can reach out on Github or on the #hackers-devtools channel on the Flutter discord.
We are eager to hear early feedback on this feature and your input on how we can improve it!
It would be very helpful if there was a way to create custom extensions for the devtool. For example, I'd like to write an extension to inspect the contents of the Hive DB. But I think there are many interesting extensions, the community could create.
The Stetho tool from Facebook allows something similar for the Chrome DevTools.
And the flipper tool also has a very powerful way to create extensions. It even allows creating custom UI.