I think you're doing it the same way I am.  I use addJavascriptInterface to
add logging class to any JavaScript I write.  Then I can use the Android
Java log class to write to the log cat.  I tag the logs with the keyword
"javascript" so I get a nice neat list of whatever I want to see.

Ken  

-----Original Message-----
From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of Maps.Huge.Info
(Maps API Guru)
Sent: Wednesday, September 08, 2010 11:44 PM
To: Android Developers
Subject: [android-developers] Re: How to debug web page on device?

Debugging webview can be tricky. A lot of the errors print in the
console. Mostly the problems aren't going to be actual JavaScript
errors if it renders fine in other devices but will be due to some
oddity in the way a particular manufacturer implemented webkit. I've
seen lots of differences in the devices. HTC is particularly odd.
Motorola is particularly good. I haven't dealt with the Samsung
variants yet but I hope they are closer to Motorola than HTC.

One way you can debug webview is to put a function in your app that
logs messages from the webview with JavaScript calls. Then sprinkle
those calls liberally throughout the JavaScript and just monitor what
happens. Look for differences in the way the devices render things.

I use this method and have found it cumbersome but effective. I use a
lot of webview stuff so if someone else knows a better way, I'm all
ears.

-John Coryat

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to