Is it possible to open developer tools console in Chrome on Android phone?
An AngularJS application works fine on desktop, but is not rendering properly on mobile (actual code is showing). This is on an Android phone.
I would like to see what errors are showing in the console.
Is it possible to open JS console on chrome app on mobile (like it is on desktop)?
You can do it using remote debugging, here is official documentation. Basic process:
- Connect your android device
- Select your device: More tools > Inspect devices from dev tools on pc/mac.
- Authorize on your mobile.
- Happy debugging!!
The code is available from Github; you can download it and paste it into a javascipt file and add it in to your HTML
You may probably try the Gear Browser, it can inspect elements and debug website just on mobile.
Please do yourself a favor and just hit the easy button:
download Web Inspector (Open Source) from the Play store.
A CAVEAT: ATTOW, console output does not accept rest params! I.e. if you have something like this:
console.log('one', 'two', 'three');
you will only see
logged to the console. You'll need to manually wrap the params in an Array and join, like so:
console.log([ 'one', 'two', 'three' ].join(' '));
to see the expected output.