Closed ghost closed 5 years ago
I think you're looking for DefaultInspectorModulesBuilder
. You can provide(...)
additional devtools domain files if you'd like but note that these need to actually be referenced by the Chrome devtools. In theory you could extend this yourself by forking the devtools UI and adding whatever you want but this was not explicitly a design goal of Stetho.
That said, it would be very possible with Stetho's design to actually just add an entirely new, third protocol implementation and create your own entirely custom UI. This is very similar to the approach taken by another developer tool released by Facebook called Flipper: https://github.com/facebook/flipper.
I have been exploring Stetho and I find it quite interesting. Tried to create my own custom:
public class AmazingAndCustomDevTool implements ChromeDevtoolsDomain {
and I add it with:
Stetho.initialize(Stetho.newInitializerBuilder(this) .enableWebKitInspector(() -> new ArrayList() {{
add(new Console());
add(new Page(getBaseContext()));
add(new AmazingAndCustomDevTool());;
}})
.build());
However it's never loaded, enable is never reached. (Sorry for the formatting)
Thank you.