- Unofficial binaries are hosted here built for our convenience: http://people.apache.org/~pmuellr/weinre/builds/?C=M;O=D;V=0
- For example this specific file: http://people.apache.org/~pmuellr/weinre/builds/2.0.0-pre-H8EOSCLN-incubating/apache-cordova-weinre-2.0.0-pre-H8EOSCLN-incubating-bin.tar.gz
- Unpack and dump all the files into a local directory. For example I put them in: ~/Dev/weinre/bin
- Run the weinre debug server in a terminal: ~/Dev/weinre/bin/weinre
- See this error? "weinre: error running server: Error: EADDRINUSE, Address already in use" - is your OSX proxy running? (e.g. stop SquidMan)
- The Weinre client and target both talk to that server
- Seemingly flattens and makes easier the connectivity situation
- SgGuest wifi credentials available from Cindy or me for TripCase team, otherwise see I/T
- Cellphone on that wifi network
- MacBook Pro on that wifi network
- "System Preferences" -> "Sharing" -> "Web Sharing" clicked on (one time only)
- Also clearly reports the MBP ip addr assigned by SgGuest: for example mine was 192.168.39.181
- On the desktop web browse here: http://192.168.39.181:8080/client/#anonymous
- NOTE: weinre server cheat-sheet on local laptop ala: http://192.168.39.181:8080
- From that page launch the client clicking on "debug client user interface"
- When the cellphone target shows up this client interface is how you access the DOM, and see JavaScript console.logs, which are the heart of our logic debug process in this context
- Put a line in the bottom of touch webapp index.html like this:
< script src="http://192.168.0.243:8080/target/target-script-min.js#anonymous" >< /script >
- This is the facility establishing a link from the webapp target to the debugging server and thus the debug client
- Will probably need to search all project .JS files in our webapp removing the "use strict" because the weinre library is a touch old and incompatible in this way
- You must have that set up and working on your machine correctly
- Best of all serves up all latest and greatest localhost touch2 client files
- Means design -> edit -> test -> debug cycle is quick as possible keeping the master repro clean
-
Means client app_config.js must be set to "local" environment for the rails server
-
Open the cellphone browser
-
Browse to the ip address assigned to it ala: 192.168.0.243:3000/touch2/
-
Now your debugging session truly begins!
Couple things to note:
Node.js needs to be installed (http://nodejs.org/)
More than likely you'll need to create a ~/.weinre/server.properties file in order to get your IP to pull up correctly. The defaults for the file are as follows:
boundHost: -all-
httpPort: 8080
reuseAddr: true
readTimeout: 1
deathTimeout: 5