Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug CSS in Android native browser?

Tags:

I'm building an hybrid app with Cordova for Android. The HTML5/CSS3 is rendered properly with Chrome for desktop and Chrome for Android.

However, through Cordova, the HTML5/CSS3 is rendered with the native browser (the application named "Internet"). And it seems there are a few troubles with the CSS interpretation.

Firefox has Firebug, and Chrome has a developer panel, available on desktop for remote debugging. Do you know any similar tool I could use in order to debug the CSS efficiently the mobile native browser?

like image 483
Yako Avatar asked May 21 '13 19:05

Yako


People also ask

How do I debug CSS in browser?

When something has gone wrong in your CSS, you can begin by using your favorite browser's built-in DevTools to: toggle off rules one at a time. toggle all rules off and bring them back one at a time. remove or relocate elements.


2 Answers

I finally found Weinre. This solution belongs to the Cordova project. http://people.apache.org/~pmuellr/weinre/docs/latest/

like image 139
Yako Avatar answered Oct 06 '22 20:10

Yako


I've tried weinre on Android 2.2 stock browser and it is working nicely

To set up it,

sudo npm install -g weinre  // make it available to external (than just localhost) weinre --boundHost -all-  // include this line (change to your IP address) to every page to be tested <script src="http://xxx.xxx.x.xxx:8080/target/target-script-min.js#anonymous"></script> 

More details from this website Remote debugging with weinre

like image 35
ken Avatar answered Oct 06 '22 20:10

ken