Monday, November 21, 2011

Weinre remote debugger

I did some checking into weinre, which basically gives you a webkit-style inspector remotely for iPad (or iPhone, or Android 2.2+). It’s very sweet, debugs any webpage, and is pretty simple to set up and use locally.  The steps to install locally on windows are below.

Step 1.
Install Java

Step 2.
Get weinre jar:

Step 3.
Allow World Wide Web Services and Java.exe in Windows Firewall (while testing)

Step 4.
Start weinre from command line:
java -jar weinre.jar --httpPort 8088 --boundHost -all-

Step 5.
Create bookmarklet on the ipad:
1. Open <computer’s ip>:8088 on your ipad.
2. Under "Target Bookmarklet", copy the entire contents of the textarea to the clipboard (“bookmarklet url in a textarea”).
3. Add the page as a bookmark.
4. Name the bookmark "Debug"
5. After the bookmark is created, edit the bookmark's url, and paste the clipboard into the url field.

Step 6.
Run the bookmarklet on any page you want to debug.

Step 7.
Open the following url in chrome to start debugging.