How to debug Android's native browser (not Chrome) on a desktop machine?

tonix picture tonix · Dec 16, 2014 · Viewed 17.7k times · Source

I can successfully debug the front end of a web application running on a mobile device using Google's Chrome DevTools (chrome://inspect) when my mobile device is using the Chrome's browser (using port forwarding). I was wondering whether it is possible to do the same using the Android's native browser, I mean the one browser pre-installed in Android which application launcher looks like this, just to be more clear, :-) :

enter image description here

Is there a way to do that? Cause when I open a tab with this browser inside chrome://inspect of course I don't get the opened tab and I can't inspect the content my device is viewing from the native browser.

I need in a way to do that because I have found some UI related problems (CSS, JS) specifically bound to the native browser, actually in chrome all works beautifully, but on the native browser no.

I have also tried to use weinre and found it very useful, but I can use it only in the context of a LAN, meaning that I have to bind the device with a LAN IP address and actually I need to access to the web application from http://localhost (like it is done in Chrome DevTools with port forwarding) because I use server-side software which strictly relies only on localhost (it is not mine, I wouldn't do that if I could).

So, is there a way to accomplish this on the Android default native browser? Using weinre and/or Chrome DevTools?

Thanks for the attention!

P.S.: I know Android browser is not native anymore from Android 4.4, anyway, I would need that for compatibility, if of course, it is possible (it should be, I guess).

Answer

stamster picture stamster · Dec 22, 2017

about:debug works for JavaScript console at least. Helped me to see why it is broken on those native, WebView based and limited browsers.