Add Stetho to on Android for Easier UI inspection and Rhino console |
|||||
Issue descriptionhttp://facebook.github.io/stetho/ I played with this in a stand-alone demo app (https://github.com/agrieve/AndroidMultiProcessPlayground) and found it to be really handy! Idea would be to just compile this in by default for is_debug=true, and never in release.
,
Dec 13 2016
,
Dec 13 2016
Felix - feel like taking this on? v1 would be with no rhino, but certainly there's immense value on adding rhino afterwards as well.
,
Dec 22 2016
Update: So far we can hook in Stetho; however, the database inspection feature is not working. The untested hypothesis is that we need to initialize Stetho with a customized DatabaseFilesProvider that can correctly locate the database files inside chrome. See DefaultDatabaseFilesProvider and SqliteDatabaseDriver https://github.com/facebook/stetho/blob/36aa5bd356d9cf5893b9424b06a83dda9ec5e44f/stetho/src/main/java/com/facebook/stetho/inspector/database/DefaultDatabaseFilesProvider.java https://github.com/facebook/stetho/blob/36aa5bd356d9cf5893b9424b06a83dda9ec5e44f/stetho/src/main/java/com/facebook/stetho/inspector/database/SqliteDatabaseDriver.java Also, for levelDb support, see https://github.com/facebook/stetho/issues/309
,
Dec 22 2016
Aside from database inspection, we plan to investigate js rhino & urlconnection https://github.com/facebook/stetho/tree/36aa5bd356d9cf5893b9424b06a83dda9ec5e44f/stetho-urlconnection https://github.com/facebook/stetho/tree/36aa5bd356d9cf5893b9424b06a83dda9ec5e44f/stetho-js-rhino
,
Jan 24 2017
Short summary of progress: Stetho & Stetho's Rhino module can be integrated into clank's dev build, using build structure similar to LeakCanary https://cs.chromium.org/chromium/src/third_party/leakcanary/BUILD.gn?sq=package:chromium&dr However, Stetho & Stetho's Rhino module should be not checked into third_party/ due to patent restrictions in its licensing. We need to instruct developers to acquire Stetho, Stetho's Rhino module, and Rhino themselves. For Mozilla's Rhino to work in our tool chain, we need to specify include_java_resources flag for Rhino's jar, as it contains resources. Rhino integration works. For example, we can use org.chromium.chrome.browser.preferences.ChromePreferenceManager.getInstance(null) to update preferences, and changes can be verified. Similar singletons can be found via code search pattern: getinstance file:java -file:third_party -file:test Because we cannot check in Stetho and related libs into third_party/, the integration would come at a greater cost. We need to investigate whether Stetho & Rhino is worthy.
,
Feb 9 2017
One more update on my thoughts on this: HierarchyViewer exists, and it's likely that Android Studio will make improvements to it. Stetho's Rhino integration is mainly just the devtools glue. We could probably enable a rhino via telnet bridge fairly easily without the need for stetho if we think this is the main value add.
,
Aug 24 2017
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by agrieve@chromium.org
, Aug 31 2016