How to debug web page on device?

by Jonas Bengtsson » Wed, 08 Sep 2010 08:54:14 GMT


Sponsored Links
 Hi all,

There's a third party web page which renders fine in the emulator and 
some Android devices. However, it doesn't look as intended on my Galaxy 
S. The page is almost only JavaScript so it's hard to know what's going 
wrong by just looking at the source. I get the same error in the browser 
as I get in a WebView in my app. I haven't been able to reproduce the 
error in any other environment than on my phone.


How do people debug these kind of things? I'm looking for something 
similar to "Developer Tools" in Chrome. If I at least could dump the 
state of the DOM that would help a lot.


Apparently getting access to a WebView's DOM from Java isn't currently 
supported [1], otherwise that would do.


Any suggestions out there?

Thanks in advance,
 Jonas


[1]  http://code.google.com/p/android/issues/detail?id=368 

--



How to debug web page on device?

by Jonas Bengtsson » Thu, 09 Sep 2010 08:12:28 GMT


 (Tried to post this yesterday, but don't think it made it. Apologies
if you get it twice!)


Hi all,

There's a third party web page which renders fine in the emulator and
some Android devices. However, it doesn't look as intended on my
Galaxy S. The page is almost only JavaScript so it's hard to know
what's going wrong by just looking at the source. I get the same error
in the browser as I get in a WebView in my app. I haven't been able to
reproduce the error in any other environment than on my phone.

How do people debug these kind of things? I'm looking for something
similar to "Developer Tools" in Chrome. If I at least could dump the
state of the DOM that would help a lot.

Apparently getting access to a WebView's DOM from Java isn't currently
supported [1], otherwise that would do.

Any suggestions out there?

Thanks in advance,
 Jonas


[1]  http://code.google.com/p/android/issues/detail?id=368 

--


Sponsored Links


How to debug web page on device?

by Maps.Huge.Info (Maps API Guru) » Thu, 09 Sep 2010 11:44:40 GMT


 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

--



How to debug web page on device?

by Ken Perry » Fri, 10 Sep 2010 00:22:15 GMT


 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

--



Other Threads

1. Root Optimus One

Suhu/Suhi

Mohon bimbingan yg sudah pakai optimus One, apakah sudah bisa di root ?

mohon bimbingannya


Thanks Before

newbie

-- 
===============
"Indonesian Android Community [id-android]"

PING'S mobile
Email: sa...@pings-mobile.com  Ph. (021) 96087100
---------------------
Yopie Ratjoen
Email: yo...@ratjoen.com  Ph. 08977726681
--------------------
Gila original
Email: i...@gilaoriginal.com  Ph. (031) 91555898
--------------------

Aturan Jual/Kloteran ID-Android  http://goo.gl/azW7

2. how to EGLimage?

I use the glTexImage2D to draw YUV frame date,but it is too slowly.
so I want to use EGLimage to draw YUV frame,but it is not display.
Do I make any mistake?  Thank you!
-------------------------------------------------------------------------------------------


                        glActiveTexture ( GL_TEXTURE1 );
                        glBindTexture ( GL_TEXTURE_2D, userData.textureId[1] );
                        glPixelStorei(GL_UNPACK_ALIGNMENT,1);
                        glUniform1i ( userData.samplerLocU, 1);
                        
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
                        
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
                        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, 
GL_CLAMP_TO_EDGE);
                        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, 
GL_CLAMP_TO_EDGE);
                        
                        eglImage = pFnEGLCreateImageKHR(g_Display, 0,
EGL_NATIVE_PIXMAP_KHR, (EGLClientBuffer) pict->data[1], 0);
                        pFnEGLImageTargetTexture2DOES(GL_TEXTURE_2D, eglImage);
                        pFnEGLDestroyImageKHR(g_Display,eglImage);
                        
                        
                        // Bind the texture
                        glActiveTexture ( GL_TEXTURE2 );
                        glBindTexture ( GL_TEXTURE_2D, userData.textureId[2] );
                        glPixelStorei(GL_UNPACK_ALIGNMENT,1);
                        glUniform1i ( userData.samplerLocV, 2);
                        
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
                        
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
                        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, 
GL_CLAMP_TO_EDGE);
                        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, 
GL_CLAMP_TO_EDGE);
                        
                        eglImage = pFnEGLCreateImageKHR(g_Display, 0,
EGL_NATIVE_PIXMAP_KHR, (EGLClientBuffer) pict->data[2], 0);
                        pFnEGLImageTargetTexture2DOES(GL_TEXTURE_2D, eglImage);
                        pFnEGLDestroyImageKHR(g_Display,eglImage);
                        

                        glActiveTexture ( GL_TEXTURE0 );
                        glBindTexture ( GL_TEXTURE_2D, userData.textureId[0] );
                        glPixelStorei(GL_UNPACK_ALIGNMENT,1);
                        glUniform1i ( userData.samplerLocY, 0);
                        
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
                        
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
                        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, 
GL_CLAMP_TO_EDGE);
                        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, 
GL_CLAMP_TO_EDGE);

                        eglImage = pFnEGLCreateImageKHR(g_Display, 0,
EGL_NATIVE_PIXMAP_KHR, (EGLClientBuffer) pict->data[0], 0);
                        pFnEGLImageTargetTexture2DOES(GL_TEXTURE_2D, eglImage);
                        pFnEGLDestroyImageKHR(g_Display,eglImage);

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

3. Downloading Problem

4. Antri galaxy tab

5. Is anyone's active install % dropping like a rock lately?

6. Miring dadakan Pengguna XT720 di Citra

7. Android Market-Aplikasi iQuran