-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide an API to create extensions for the devtools #1632
Comments
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 |
👋 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. 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 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 Note: for this to work properly, the
|
Implementation TrackerDevTools app [COMPLETE]Task list
package:devtools_extensions [COMPLETE]Task list
package:devtools_app_shared [COMPLETE]Task list
package:extension_discovery [COMPLETE]Task list
package:devtools_server [COMPLETE]Task list
Extensions land wellTask list
open questions / edge cases to consider
|
Initial draft for a |
Cool! Tell me whenever there's something I can play with :) |
This endpoint manages reading and writing to/from the `devtools_options.yaml` file. This file will store DevTools extension activation states and will live in a project's root directory (similar to `analysis_options.yaml`). Example `devtools_options.yaml` file: ``` extensions: - foo: true - bar: false ``` In this scenario: - the devtools extension for `package:foo` has been enabled by the user - the devtools extension for `package:bar` has been disabled by the user - the devtools extension for some other `package:baz` has been neither enabled nor disabled (meaning that DevTools should prompt the user to activate). This API will be consumed by DevTools app in a follow up PR. work towards #1632
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.
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.
The text was updated successfully, but these errors were encountered: