Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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).

like image 305
tonix Avatar asked Dec 16 '14 19:12

tonix


People also ask

How do I debug mobile browser on desktop?

To do that: Go to Developer Options and toggle the USB Debugging option to enable it. Then, open the Chrome browser on your computer and the DevTools using the F12 function key. In the DevTools, go to Settings and enable the option of Discover USB devices.


1 Answers

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

like image 53
stamster Avatar answered Oct 06 '22 08:10

stamster