Phonegap / Cordova Too Many CordovaLog Web Console Magazines

I am using the latest version of phonegap / cordova 2.1. and I get too many logs in logcat eclipse: everything is written twice using fe

console.log("test") CordovaLog test Web Console test 

This can be disabled by filter in eclipse, but there should be a smarter solution.

+6
source share
4 answers

You must edit the following entry

 <log level="DEBUG"/> 

in the config.xml file.

Available Values: ERROR , WARN , INFO , DEBUG , VERBOSE (default = ERROR)

Setting ERROR you will see the least number of log messages.

+9
source

Take a look at this

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

UPDATE:

After much hard work, I found out that this is the best and only solution available right now to debug your javascript code with phonegap, to open the HTML file in the browser and use its console to debug it. IE (Google Chrome) In addition, the JSFiddle function of JSLint helps you find almost all errors in your code.

Best wishes

+3
source

Another possibility is to use weinre:

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

install it through node.js and start the weinre server with the following command:

 weinre --boundHost -all- 

then bind the weinre debugger in your index.html (replace localhost with your actual IP address):

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

Weinre will show you the console and explorer, similar to the developer tools in browsers. You can contact him on your PC by clicking http://localhost:8080 in your browser.

EDIT: see also a summary of debugging methods: https://github.com/phonegap/phonegap/wiki/Debugging-in-PhoneGap

0
source

Now the situation may change.

Use below:

 <preference name="loglevel" value="VERBOSE" /> 
0
source

All Articles