1

This is the first time, I am working on cordova applications. I created a dummy application as per documentation and tested in simulator working fine.

Now I made an .APK file and installed in my own android device, there also working fine. Whenever I am modified anything, I have to make APK file and re-installing... these everything taking time for my development.So I decided to test application directly in my device instead of simulator. I Goggled and found URL-1 URL-2, They are suggesting,we can overcome this with USB cable. As per their suggestions I did it, now directly I am running application into my device(I mean no need to make APK file).

Note : I am using Eclipse,windows7 for my development.

Until now, this was fine, but the problem I am not able to console . If I test my application with simulators I can console in browser using chrome tools, that way I can identify what going wrong. I can put breakpoints there and I can debug.

I don't want to test with simulators(I want to test directly with my devices), but I can't able to see console If I test with my own device.

Regarding this, I searched but I didn't find any solutions. can anyone help me.

Basically

  1. I want to test my application directly with my device(don't want to test with simulators)

  2. I want to console

I did first point with USB, I didn't find any way for my second point. can anyone help me .

Thanks.

Community
  • 1
  • 1
vasan
  • 2,203
  • 3
  • 18
  • 22
  • 1
    If you debug your apps on device using chrome-tools you will need android4.4 version mobile. and refer this it's may be helpful for you http://phonegap.com/blog/2014/04/23/phonegap-developer-app/ – cfprabhu Oct 31 '14 at 15:40
  • @prabhu I am using `gapDebug` app to debug my cordova application. It's very simple. – vasan Nov 01 '14 at 10:27

2 Answers2

2

You have a few options: The easiest option is to use alerts instead of console logs. This is a little annoying still since you potentially get a bunch of alerts, but it's definitely better than rebuilding and/or redeploying your cordova application every time you want to test something.

If you are set on using console.log(), you need to install abd and use logcat. For information on setting this up, check this url:

https://developer.mozilla.org/en-US/Firefox_OS/Debugging/On-device_console_logging

You can run this command in your terminal to output the logs once you have installed abd:

abd logcat

JMac
  • 1,726
  • 3
  • 14
  • 30
0

I am using gapDebug app to debug my applications. It's very simple.

vasan
  • 2,203
  • 3
  • 18
  • 22
  • @prabhu I think, you work on `nfc` Apps. can you look this link `http://stackoverflow.com/questions/26688456/my-cordova-application-not-launching-after-nfc-tag-detect` – vasan Nov 01 '14 at 10:44
  • now i am not working on that.I need your contact mail address if you can let me know? cfprabhu@yahoo.com – cfprabhu Nov 03 '14 at 16:23