-
Notifications
You must be signed in to change notification settings - Fork 1.1k
FAQ
If you the Chrome DevTools doesn't appear to have any functionality, and logcat shows a large amount of message spam such as:
D/ChromeDevtoolsServer﹕ Method not implemented: Not implemented: Page.canScreencast
D/ChromeDevtoolsServer﹕ Method not implemented: Not implemented: Page.canEmulate
D/ChromeDevtoolsServer﹕ Method not implemented: Not implemented: Worker.canInspectWorkers
D/ChromeDevtoolsServer﹕ Method not implemented: Not implemented: Console.setTracingBasedTimeline
D/ChromeDevtoolsServer﹕ Method not implemented: Not implemented: Console.enable
D/ChromeDevtoolsServer﹕ Method not implemented: Not implemented: Network.enable
Then you may need to modify your proguard rules to not name mangle certain Stetho classes whose names map directly to the client/server protocol spoken by Stetho. Edit proguard-rules.pro
as follows:
-keep class com.facebook.stetho.** {
*;
}
See http://www.littlerobots.nl/blog/stetho-for-android-debug-builds-only/ for our recommended approach. This approach is also used by stetho-sample.
If no network traffic appears, it's likely that you are inadvertently using the legacy compatibility layer called OkUrlFactory
. Older versions of Picasso (<= 2.4), Retrofit (<= 1.8), etc use this to have a common HttpUrlConnection
code path. If you are using one of these older libraries, the easiest thing to do is to upgrade to the latest.
This is commonly caused by having multiple OkHttpClient
instances in the application. Only those applications which have had StethoInterceptor
installed will work properly. If you are using a third-party library such as Picasso or Retrofit, consult the initialization API to find out how to pass your specific OkHttpClient
instance to them.
If you use Volley with OkHttp, we recommend OkHttpStack.
If you are using the default HurlStack
implementation, you will likely want to use com.facebook.stetho:stetho-urlconnection
to hook into it from a custom subclass. This pull request tracks our progress providing a more generic and re-usable wrapper however: #51.
The stetho-sample
in the source provides a good example of how this can be done. Specifically, see the Networker class. This uses the com.facebook.stetho:stetho-urlconnection
dependency in Maven/Gradle.
There is a small magnifying glass icon in the upper left of the Chrome DevTools UI (to the left of the "Elements" tab itself). Click it, which will cause it to turn blue. Then tap on the view you're interested in on your phone/emulator. The view should now be selected in the Elements tab.
If the wrong view is selected, this is likely due to a heuristic error on our part. Please file an issue and we'll be happy to look into what we can do to improve the algorithm.