concept Weinre in category cordova

This is an excerpt from Manning's book Apache Cordova in Action.
Once you’ve installed Weinre, you can run it at the command line by typing weinre, as shown in figure 7.28.
This will fire up a default instance of the server on port 8080. The command line supports a variety of options. You can print help for the tool by using weinre -h. One option you’ll most definitely need to use is boundHost. By default Weinre is active on localhost. But to use Weinre in your mobile devices, you need an address that your mobile device can connect to. The localhost address basically means myself, and on a mobile device localhost would refer to the device, not your machine running Weinre.
The best address to use for Weinre is the IP address your local network has assigned to you. How you get your local IP address depends on your OS. On a Mac, it is in the Network part of System Preferences. On Windows it can be found in the Network application of the control panel. Once you have your IP address, pass it to Weinre using --boundHost as an argument, as shown in figure 7.29.
Once Weinre is running, open the address specified from the output in your browser (figure 7.30).
For the final example of remote debugging, we’ll look at the open source Weinre project. Weinre is a somewhat old project and was built before remote debugging for Android and iOS existed. In general, I do not recommend using Weinre unless you can’t get the earlier two options to work. If you visit the Weinre homepage http://people.apache.org/~pmuellr/weinre-docs/latest/, you’ll see a very large, very direct message asking you if you’re sure you need to use it. This isn’t meant to imply that Weinre is bad; it simply isn’t as useful as it once was. But it’s important to know how to work with it in those few cases where you need it.
Weinre works by sending debugging information from your mobile device to a remote server. To make this work you need to include one script tag into your code. This script tag needs to be removed before you release your application. Let’s walk through the process of installing, running, and using Weinre.