I am developing the application in HTML which is calling the console.log()
from Javascript to provide me logs during the development about what happens in the web page code.
Unfortunately when I use the adb logcat
command to check logs I can see output from all other applications, but not the output from my JavaScript code. I can see even the log from web browser that the page is loaded, but not console.log()
output from my JavaScript code executed in the web browser.
According to information on this page (http://developer.android.com/guide/webapps/debugging.html) it should work.
I am testing on HTC WildFire and HTC Desire HD.
Edited after more then 6 months
After some time and experience with different devices (phones, TVs, set top boxes, WebViews, UIWebViews...) my advice is to do the remote logging from JavaScript and not relying on the console.log() or other methods - see the nice trick with the image loading here.
Do not miss the presentation here Hope this helps! STeN
Navigate to device settings and enable Developer Options (see section for ADB logs) Navigate to Developer Options and tap on Take/Submit Bug Report. Select Full Report when prompted to get the full device info along with the logs.
With the Chrome browser open, right-click anywhere in the browser window and select Inspect from the pop-up menu. By default, the Inspect will open the "Elements" tab in the Developer Tools. Click on the "Console" tab which is to the right of "Elements".
Android logcat is a command-line tool that dumps a log of system messages, including stack traces when the device throws an error and messages that are written by applications with the "Log" class.
In the default browser on Android 2.3.3 (and presumably from then on) you can simply use the built in javascript console:
about:debug
in the address bar and hit enterAt the top, you'll see a bar labeled "JavaScript Console".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With