最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to see Console log output in samsung galaxy S2 - Stack Overflow

programmeradmin1浏览0评论

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.

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.

Share Improve this question asked Oct 17, 2012 at 9:07 Mohamed HussainMohamed Hussain 7,72315 gold badges60 silver badges87 bronze badges 3
  • may be this link help you – Ram kiran Pachigolla Commented Oct 17, 2012 at 9:14
  • @Ram:Thanks but i tried this before asking this question i.e i enter about:debug in address bar , i am not seeing anything – Mohamed Hussain Commented Oct 17, 2012 at 9:16
  • see this which worked for my s2 standard with no hassle stackoverflow./questions/5538516/… – Clark Commented Jun 5, 2014 at 17:04
Add a ment  | 

2 Answers 2

Reset to default 9

Warning: No Longer Working!

This solution appears to no longer be functional as the web tool has not been maintained over the years.


Try using JSConsole.. It's a remote debugger for JavaScript. The setup is basically just injecting a <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 mands on the client.

Steps to Setup

  1. Go to JSConsole Home Page, and type :listen.
  2. Copy the resulting <script src="http://jsconsole./remote.js?..."></script>.
  3. Drop that into the page you need to debug.
  4. Open your page in any browser (phone, tablet, desktop, etc). All console.log calls will be forwarded to the JSConsole. 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

  1. Using WEINRE
  2. Using Eclipse

Method 1:

Use WEINRE remote WEb Inspector in REmote. it is a nodejs package. Steps to install WEINRE.

  1. Install nodejs
  2. run this mand to install weinre :npm install -g weinre (for MACsudo npm install -g weinre)
  3. Then launch WEINRE: weinre --boundHost -all- --httpPort 8082, here 8082 is port number where WEINRE is launched.
  4. Then add the following script tag in the HTML/web page you want to debug or to see console messages, <script src="http://xx.xx.xx.xx:8082/target/target-script-min.js#weinredemo"></script>
  5. xx.xx.xx.xx is the IP of your machine.
  6. weinredemo is the ID for your page and you can use any of our own.
  7. Then open the page , where you want to see console messages in any mobile device.
  8. Open this page any webkit browser,http://localhost:8082/client/#weinredemo
  9. There go to console tab and see the messages.

Method 2:

  1. 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.
发布评论

评论列表(0)

  1. 暂无评论