2

I am developing a PhoneGap App in Android Studio. I want to know how to debug HTML/JavaScript code in Android Studio. I'm not able to put break points here.

Please help me to resolve this. I am using Android Studio (2.2.2) version.

Trinimon
  • 13,839
  • 9
  • 44
  • 60
venkatesh gowda
  • 841
  • 2
  • 12
  • 26
  • 3
    Possible duplicate of [How can I debug javascript on Android?](http://stackoverflow.com/questions/2314886/how-can-i-debug-javascript-on-android) – bindal Nov 29 '16 at 12:31
  • OP want to debug JavaScript/HTML which is commonly not considered as native code. Fixed many typos in addition. – Trinimon Nov 29 '16 at 20:04

2 Answers2

1

You can only remote debug java /C++ code in Android Studio. You cannot debug javascript code from Android Studio.

If you are developing from PhoneGap CLI or Cordova CLI (Command line interface) you can make use of Google Chrome Remote debugging for debugging of Javascript code: Check out https://developers.google.com/chrome-developer-tools/docs/remote-debugging for more information.

Sum up:

Android Studio only allows remote debug of native code (Java , C++)

PhoneGap/Cordova CLI only allows remote debugging of Javascript code

OneXer
  • 303
  • 9
  • 20
0

do you want to put debug points in html and javascript files?
if yes then its not possible to put break point in html and javascript files , only you can do is use

alert or
console.log 

statements to debug

bindal
  • 1,940
  • 1
  • 20
  • 29