I'm working on an Ionic/Cordova cross-platform application and I'm struggling a little bit with the debugging.
Debug can of course be done directly from the browser by running ionic serve
and then using the browser developer tools, but some behaviors happen only on real devices.
Adding a detailed guide to do this..
ionic cordova run android -l --external
chrome://inspect/#devices
If all was done correctly, you will see your device name and app name there with an option to inspect. This will open the chrome developer console exactly similar to the web one.
Now you can debug the app right on the device. Add breakpoints, edit html and see the logs as well.