Goje87
Goje87

Reputation: 2869

How to install weinre on mac?

I wanted to debug my mobile web app that would be running on a mobile device or simulator (like iOS simulator). On googling a lot I came across Weinre but could not figure out how to install on my macbook.

Upvotes: 0

Views: 1701

Answers (2)

cassi.lup
cassi.lup

Reputation: 1261

Short update: though Goje87's answer is perfectly accurate, I want to point out that as of iOS 6, Apple has supercharged Safari's web inspector to be able to inspect HTML pages running within apps on iOS devices.

The advantage over Weinre is that you can even debug JS scripts (breakpoints, watches etc.).

Here's a guide on making this work: http://moduscreate.com/enable-remote-web-inspector-in-ios-6/

EDIT: You need a Mac for this.

Upvotes: 0

Goje87
Goje87

Reputation: 2869

I was able to comfortably install weinre following the instructions on page http://blog.joelambert.co.uk/2012/05/17/installing-weinre-on-mac-os-x/ .

After installation, I executed weinre command which started a server on http://localhost:8080. I typed the same on my desktop browser which gave me further instructions. It asked me to copy-paste a script tag (similar to <script src="http://localhost:8080/target/target-script-min.js#anonymous"></script>) into the page (http://myMobApp.local) that I was trying to remotely debug. I did that and opened the mobile app page on my iOS simulator. After it loaded in simulator I open the debug client user interface link (similar to http://localhost:8080/client/#anonymous) that was shown on the instructions page. It gave me a beautiful interface to debug the web app running on simulator.

Upvotes: 0

Related Questions