2

I was wondering if you could suggest a javascript debugger which works on Android webkit.

I was trying to inject the following code into Android Webkit but for some strange reason could not do it in the begining (i think it might have to do something with specificity but not sure)

document.body.style.color='#ff00ff';

2 Answers 2

2

you might want to take a look at weinre:

Sign up to request clarification or add additional context in comments.

1 Comment

thanks for the reply, i have started working with firebug for getting a hang of things and then will move to weinre soon as i feel a bit more comfortable with firebug
0

Try jsHybugger: http://www.jshybugger.org/

It lets you set breakpoints, singlestep, catch exceptions, and interact with the JS/DOM environment. You can use it from Eclipse or from a Chrome or Chrome-compatible debugger on the remote desktop. It can be used with apps that create their own webView.

However, you have to install a few files -- but probably no more complicated to use than weinre. it does extensively modify the JS files (on the fly, transparently to the user) to enable all this debugging -- webKit really should support javascript debugging natively.

Your question shows an issue with altering CSS, which weinre does well. I didn't see that weinre supported debugging javascript (ie breakpoints and singlestepping)

3 Comments

You seem to post a lot of answers recommending jsHybugger, so hopefully you can help me. I need to be able to debug javascript directly on an Android tablet device including setting breakpoints and stepping through the code. The specs (screen, memory, etc.) are more than sufficient but it seems like nobody in the world wants to allow this to happen on a mobile device. And yet there are cases when I do not have a second machine to debug on, or even a network connect (try fully debugging an offline web app remotely!). So, can jshybugger do this? I've read a bit, but it's unclear to me...
Michael, I don't know. I was using it through Eclipse, in a very non-standalone mode. So in that manner you could not do it on a tablet. However the jsHybugger infrastructure should be able to use accessed from a local (on the same tablet) client. However, I bet that would require a lot of development. Try contacting the jsHybugger author.
Thanks, looks like it's mostly working, at the moment I'm stuck on the fact that jsHybugger won't talk to an https source, so I need an https to http reverse proxy that will run directly on the tablet.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.