How to get log of application if it is build and run through The cordova/phonegap CLI?

3.3k Views Asked by At

I Have Created an App using cordova. When I do test on eclipse i get all console.log printed in logcat . Similarly in xcode i get them in xcode. Console.log helps me tracing what is happening in JS file like what i am sending in Ajax and what i am getting the response. I used cordova build command to build cordova emulate to run on emulator . Now i want to get logs while playing with app in emulator. Phonegap documentation say use -d command while building but i dont need the log of building. I need logs of apps while running How to check these logs in phonegap cli?

1

There are 1 best solutions below

0
On

I think you can use the monitor app that is in your Android Development Tools. You can find it here :

$ cd {PATH-TO-ADT}/sdk/tools/

Then just start it :

$ monitor

You can then see the different devices that are plugged to your machine and also the emulators running. At the bottom of the monitor you'll find the LogCat. You can also save filters for custom research, use 'Web Console' as Log Tag to filter the console.log().

More info here : http://developer.android.com/tools/help/monitor.html