Phonegap/Cordova too many logs CordovaLog Web Console
Asked Answered
C

4

7

I am using the latest phonegap/cordova version 2.1. and I am getting too many logs in eclipse logcat: everything is logged twice using f.e.

console.log("test")

CordovaLog   test
Web Console  test

This could be disabled by a filter in eclipse, but there must be smarter solution.

Celeriac answered 29/10, 2012 at 10:9 Comment(2)
did you try to build you app in the release mode. i think that should solve the issue.Execute
Thanks. I think it is not a suitable solution because it takes too much time to use the wizard every time. Have you tested it?Celeriac
P
10

You should edit the following entry

<log level="DEBUG"/>

in the config.xml file.

Available values are ERROR, WARN, INFO, DEBUG, VERBOSE (default=ERROR)

Setting to ERROR you will see the least amount of log messages.

Pahl answered 26/11, 2012 at 5:16 Comment(0)
V
3

Take a look at this

http://css.dzone.com/articles/setting-console-debugging

UPDATE :

After a lot of hard work, I found out that is the BEST and the ONLY solution available right now to debug your javascript code with phonegap is to open the HTML file in the browser and use its console to debug it IE (Google Chrome) , Also, JSFiddle's JSLint feature will help you find almost all the bugs in your code

Best Regards

Vilmavim answered 26/11, 2012 at 4:37 Comment(3)
thnak you. seems like there is no solution yet, only filtering in eclipseCeleriac
I would love to see a full implementation of phonegap in Eclipse/Zend Studio, it is hard to debug the code without a good solution to find out whats wrongVilmavim
Agreed. Debugging Phonegap apps is a nightmareBirkner
M
0

Another possibility is to use weinre:

http://people.apache.org/~pmuellr/weinre-docs/latest/

install it via node.js and run a weinre-server with following command:

weinre --boundHost -all-

then link the weinre debugger in your index.html (replace localhost by your actual IP):

<script src="http://127.0.0.1:8080/target/target-script-min.js#anonymous"></script>

Weinre will show you a console and explorer similar to developer tools in browsers. You can reach it on the your PC by calling http://localhost:8080 in your browser.

EDIT: see this summary of debug methods as well: https://github.com/phonegap/phonegap/wiki/Debugging-in-PhoneGap

Metabolite answered 13/1, 2015 at 21:29 Comment(0)
N
0

Things might have changed a bit now.

Use the below now:

<preference name="loglevel" value="VERBOSE" />    
Nicholasnichole answered 22/11, 2017 at 8:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.