Live data from Hacker News

Stetho: A new debugging platform for Android

code.facebook.com

11–20 of 26 posts

Re: Stetho: A new debugging platform for Android

#12
post #7

Ah and I had just finally coughed up 50 dollars for my Charles license. Charles is a nice tool, but this seems so much nicer as I don't see anywhere that the user is required to setup a proxy manually on the phone. This does make me wonder how their HTTP debugging works? I am assuming that data is passed over USB. Are they using ADB underneath this all?

It requires you to compile a proxy into the application:

    OkHttpClient client = new OkHttpClient();
    client.networkInterceptors().add(new StethoInterceptor());

Re: Stetho: A new debugging platform for Android

#14
post #7

Ah and I had just finally coughed up 50 dollars for my Charles license. Charles is a nice tool, but this seems so much nicer as I don't see anywhere that the user is required to setup a proxy manually on the phone. This does make me wonder how their HTTP debugging works? I am assuming that data is passed over USB. Are they using ADB underneath this all?

It requires you to compile a proxy into the application: OkHttpClient client = new OkHttpClient(); client.networkInterceptors().add(new StethoInterceptor());

How is that really a proxy if it gets compiled into your application? From what others have said it sounds like the real mechanism is over adb.

Re: Stetho: A new debugging platform for Android

#15

I skimmed through their github page, but didn't see if they offer view hierarchy debugging. Being able to easily navigate an xml dump of the screen would be amazing using Chome Tools. Android Device Monitor is not the most elegant of interfaces.

agreed, it looks like there is this open ticket:

https://github.com/facebook/stetho/issues/14

Would be really dope if they got that integrated into the elements tab.

Re: Stetho: A new debugging platform for Android

#16
post #2

This looks really neat! As the post suggests, we also have been doing a lot of janky Log calls to debug our app's network code. I am really impressed by a lot of the Facebook open source releases. Each new one makes me even sadder that you can't use them due to the crazy patent license they've started using: https://github.com/facebook/stetho/blob/master/PATENTS "The license granted hereunder will terminate, automati…

Just an honest question: What's the benefit of using this over the adb bridge and debug bridge to debug code on-the-fly?

Re: Stetho: A new debugging platform for Android

#17

I skimmed through their github page, but didn't see if they offer view hierarchy debugging. Being able to easily navigate an xml dump of the screen would be amazing using Chome Tools. Android Device Monitor is not the most elegant of interfaces.

As others have mentioned we are working on getting a hierarchy viewer built now.

Re: Stetho: A new debugging platform for Android

#18
post #2

This looks really neat! As the post suggests, we also have been doing a lot of janky Log calls to debug our app's network code. I am really impressed by a lot of the Facebook open source releases. Each new one makes me even sadder that you can't use them due to the crazy patent license they've started using: https://github.com/facebook/stetho/blob/master/PATENTS "The license granted hereunder will terminate, automati…

Just an honest question: What's the benefit of using this over the adb bridge and debug bridge to debug code on-the-fly?

The biggest difference is you dont need to add debug code deploy, you just connect.

For things like the network traffic it is really hard to see request/response for a particular thing.

For the dumpers - those are basically a main method inside your program that you can run whenever. Its a nice way to change (or dump) state of the program, similar to adb shell dumpsys, but also allows a richer interface for changing state.

Re: Stetho: A new debugging platform for Android

#19

Earlier quoted context omitted.

It requires you to compile a proxy into the application: OkHttpClient client = new OkHttpClient(); client.networkInterceptors().add(new StethoInterceptor());

How is that really a proxy if it gets compiled into your application? From what others have said it sounds like the real mechanism is over adb.

Its not a proxy, it requires that you build hooks into your http engine (OkHttp/HttpUrlConnection) to forward events to the NetworkEventReporter interface.

Re: Stetho: A new debugging platform for Android

#20
post #10
post #5

Earlier quoted context omitted.

I was going to write a rebuttal saying that it's unlikely that any of this specific Software [Stetho] is covered by patent claims, so it wouldn't matter if you lost the license to Facebook's patents. But then I saw this: http://stks.freshpatents.com/Facebook-Inc-nm1.php 314 patents in 2014, 69 just since the start of 2015. That's... just absurd.

It wouldn't matter if this was covered or not. Their license is saying that you can use their stuff as long as you don't question any of their patents.

Github would earn a lot of respect if they simply disallowed that sort of license for anything hosted with them.
Post reply on HN