9

I have PhoneGap app running in Android. I need to see the browser log (not just the console.log()) so that I could see all the errors and possibly warnings. I am aware of this similar question, however, that doesn't solve my problem, because it deals only with console.log(). My app is crashing in Android 1.6 browser and I need to see why. There is probably some syntax detail, which all newer Android browsers don't mind, but 1.6 is probably complaining about something and I need to see what.

I am using Eclipse, so if it is possible to use it to see browser error console, it would be great. I am also aware of LogCat tool in Eclipse, but it doesn't show any output from PhoneGap internal browser at all. Please help, I am lost ;-)

3 Answers 3

7

As of Phonegap 1.6 (Cordova), you can get console.log by watching the output from LogCat for the tag CordovaLog. If you are using Eclipse, you can add a new filter for phone gap logs. Just click the plus sign, choose whatever you want in the Filter name field and make sure to add: CordovaLog in the by Log Tag field.

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

Comments

1

I'm afraid I don't think it's possible. I've certainly not been able to find a way of doing it as of yet.

I debug the JavaScript of my PhoneGap web applications by running them first in Chrome and stepping through the JS debugger. If you're not dependent on native API calls then this is probably the best method.

Please let me know if you find a better method.

Here's a reliable source that backs up what I've said: http://www.phonegap.com/2011/05/18/debugging-phonegap-javascript/

EDIT: I just found this https://chrome.google.com/webstore/detail/geelfhphabnejjhdalkjhgipohgpdnoc#

Looks like an excellent tool for what we are after! I'm going to try it out now.

4 Comments

Thats exactly the way I am doing it, debug in Chrome and when possible I use conditions for native API calls so as a by-product I have webapp ready for Chrome Webstore..
@Frodik, I actually just found an excellent Chrome Plugin, see my updated answer.
TinyHippos (the authors of Ripple) were acquired by RIM on March 25th, though it appears that they intend on continuing to support Ripple. tinyhippos.com/2011/03/25/…
@Zoot Yeah I saw that too. Fingers crossed.
-1

This is the tool that I use. Very handy and you can see a lot more then just console messages. You can interact with the mobile device (also PhoneGap apps) like chrome developer tools. I also think it is much better then Ripple. Debugging on the real device is always better!

http://debug.phonegap.com/

Comments

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.