I am using samsung galaxy s2 version 2.3.3, i open a web page in android default web browser.
In the Page i put console.log(“some info”) to debug the page, but i am unable to see the console.log output in my device.Please help me in this.Thanks in advance.
Warning: No Longer Working!
This solution appears to no longer be functional as the web tool has not been maintained over the years.
<script> tag in your page. Once connected you can read all the
console.log calls from the remote page on JSConsole, as well as execute commands on the client.
Steps to Setup
- Go to JSConsole Home Page, and type
- Copy the resulting
- Drop that into the page you need to debug.
- Open your page in any browser (phone, tablet, desktop, etc). All
console.logcalls will be forwarded to the JSConsole.com window.
There are more details plus a couple of useful videos on the Remote Debugging Page.
In Two ways we can see console.log messages
- Using WEINRE
- Using Eclipse
Use WEINRE remote WEb Inspector in REmote. it is a nodejs package. Steps to install WEINRE.
- Install nodejs
- run this command to install weinre :
npm install -g weinre(for
sudo npm install -g weinre)
- Then launch WEINRE:
weinre --boundHost -all- --httpPort 8082, here
8082 is port number where WEINRE is launched.
- Then add the following script tag in the HTML/web page you want to
debug or to see console messages,
xx.xx.xx.xxis the IP of your machine.
weinredemois the ID for your page and you can use any of our own.
- Then open the page , where you want to see console messages in any mobile device.
- Open this page any webkit
- There go to console tab and see the messages.
- please connect your mobile via USB drive and see the phone listed in ECLIPSE and need to install ANDROID ADT plugin for eclipse to see the console messages in Eclipse.