I have to debug an Android app into Android Studio; the app contains scripts written in Javascript. Is there a way to add breakpoints to line of codes written in Javascript?
I have to debug an Android app into Android Studio; the app contains scripts written in Javascript. Is there a way to add breakpoints to line of codes written in Javascript?
Share Improve this question edited Dec 4, 2021 at 3:43 cigien 60.5k11 gold badges81 silver badges121 bronze badges asked Sep 5, 2016 at 6:33 A MA M 8491 gold badge15 silver badges27 bronze badges 2- 1 Yes it is possible to Debug Javescript in android, see this stackoverflow./questions/2314886/… – AiVision Commented Sep 5, 2016 at 7:09
- Possible duplicate of How can I debug javascript on Android? – JJJ Commented Jan 1, 2019 at 15:53
2 Answers
Reset to default 3Open chrome and go to DevTools ( Inspect Element),
click the Main Menu then select More tools > Remote devices.
open the Settings tab.
Make sure that the Discover USB devices checkbox is enabled.
Connect your Android device directly to your development machine using a USB cable. The first time you do this, you usually see that DevTools has detected an unknown device. If you see a green dot and the text Connected below the model name of your Android device, then DevTools has successfully established the connection to your device
In the Remote Devices tab, click the tab that matches your Android device model name and Click "Inspect"
check this link for debugging JavaScript on Android in details
https://developers.google./web/tools/chrome-devtools/remote-debugging/
Or easier way - in Chrome (or any Chromium-based browser as Edge) type url: chrome://inspect#devices.