How to view console.log in intellij idea using phonegap

673 views Asked by At

I have installed those plugins

enter image description here

JAVASCRIPT

document.addEventListener('deviceready', onDeviceReady, false)
var onDeviceReady = function () {
    console.log("console.log works well")
}

How can I catch the log message in console?

And what made me feel strangely was phonegap tolded me the console file location '~/Projects/Mine/Test/PhoneGapTry/platforms/ios/cordova/console.log' ,but I could not find it

1

There are 1 answers

1
Eric Gopak On

There are basically two ways:

  • One is to run cordova with live-reload server, i.e. cordova run <your_platform> -l -c, then the -c flag redirects console.log messages to your console.
  • Another is to use remote debugging via a browser (Safari for iOS apps, Chrome on Android).