How to see console log output in Samsung S2 Galaxy

I am using samsung galaxy s2 version 2.3.3, I open the webpage in the default android browser.

On the page, I put console.log ("some information") the page is being debugged, but I can not see the console.log output on my device. Please help me with this. Thanks in advance.

+8
source share
2 answers

Warning: no longer working!

This solution does not seem to work anymore since the web tool has not been maintained for years.


Try using JSConsole.com . This is a remote debugger for JavaScript. Basically, the installation simply inserts the <script> into your page. After connecting, you can read all console.log calls from a page on the remote JSConsole server, and also execute commands on the client.

Setup steps

  1. Go to the JSConsole home page and type :listen .
  2. Copy the resulting <script src="http://jsconsole.com/remote.js?..."></script> .
  3. Drag this to the page you want to debug.
  4. Open your page in any browser (phone, tablet, computer, etc.). All calls to console.log will be redirected to the JSConsole.com window.

The remote debugging page has more details and a couple of useful videos.

+9
source

In two ways we can see console.log messages

  • Using WEINRE
  • Using Eclipse

Method 1:

Use the WEINRE remote WEb Inspector in REmote. this is nodejs package. Steps to install WEINRE.

  • Install nodejs
  • run this command to install weinre: npm install -g weinre (for MAC sudo npm install -g weinre )
  • Then run WEINRE: weinre --boundHost -all- --httpPort 8082 , here 8082 is the port number on which WEINRE is running.
  • Then add the following script tag to the HTML / web page you want to debug or view console messages, <script src="http://xx.xx.xx.xx:8082/target/target-script-min.js#weinredemo"></script>
  • xx.xx.xx.xx is the IP address of your machine.
  • weinredemo is the identifier for your page, and you can use any of ours.
  • Then open the page where you want to see console messages on any mobile device.
  • Open any webkit browser page, http://localhost:8082/client/#weinredemo
  • Go to the console tab and view the messages.

Method 2:

  • connect your mobile phone via USB and look at the phone specified in ECLIPSE, and you need to install the ANDROID ADT plugin for eclipse to view console messages in Eclipse.
0
source

All Articles