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.

2
  • 3
    Possible duplicate of How can I debug javascript on Android? Commented Nov 29, 2016 at 12:31
  • OP want to debug JavaScript/HTML which is commonly not considered as native code. Fixed many typos in addition. Commented Nov 29, 2016 at 20:04

2 Answers 2

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

Sign up to request clarification or add additional context in comments.

Comments

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.