Steth0 – Great Debug brige for Android Apps

Stetho is one of the great debug tool i have come across during my android development. it has helped me to identify the issue with any Rest call and also fix them easily. In addition to it, it can access to the DB information of the clients…wow…one tool to explore lot of android apps in ease. refer http://facebook.github.io/stetho/ – ( Features, setup, How to use it…etc).

Configuration

Screen Shot 2016-03-31 at 10.45.33 am

Integrating with App

Its best suggested to use it only in Debug mode. Try to initialize stetho in your application onCreate.

if (BuildConfig.DEBUG) Stetho.initializeWithDefaults(this); // integrate with Stetho

Also help your http client to know about stetho by adding the below code.

if (BuildConfig.DEBUG) networkInterceptors().add(new StethoInterceptor()); // debugging with stetho

Voila…you are done now with integration. Time to launch the tool

Using Stetho tool

When enabled, developers have access to the Chrome Developer Tools feature natively part of the Chrome desktop browser. Just launch your chrome browser and type

chrome://inspect/

refer the screenshot below. Just click Inspect, Stetho launched

Screen Shot 2016-03-31 at 10.55.02 am
Resources Tab : access DB info of the app. Quite easy.

Screen Shot 2016-03-31 at 11.05.09 am

Network tab: Provides network call with detail headers, param and response.
Pretty good info if your app is using lot of Rest calls.

Screen Shot 2016-03-31 at 11.12.48 am

I haven't fully realize the tool, but it worth mentioning that it helped me
in development.

Happy Coding 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s