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
2 Answers
Reset to default 9Warning: 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
- Go to JSConsole Home Page, and type
:listen
. - Copy the resulting
<script src="http://jsconsole./remote.js?..."></script>
. - Drop that into the page you need to debug.
- 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
- Using WEINRE
- Using Eclipse
Method 1:
Use WEINRE remote WEb Inspector in REmote. it is a nodejs package. Steps to install WEINRE.
- Install nodejs
- run this mand to install weinre :
npm install -g weinre
(for MACsudo 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,
<script src="http://xx.xx.xx.xx:8082/target/target-script-min.js#weinredemo"></script>
xx.xx.xx.xx
is the IP of your machine.weinredemo
is 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
browser,
http://localhost:8082/client/#weinredemo
- There go to console tab and see the messages.
Method 2:
- 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.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1743706592a4493472.html
评论列表(0条)