Search code examples
cordovaremote-debuggingweinre

Can't connect Weinre target to Weinre client (ios)


I am using phonegap and looking for a debugger for my javascript during the whole afternoon, but still couldn't find the solution. I have Weinre installed on my Mac, I succeeded in running the server by executing "weinre" on terminal. I have an app installed on my iphone 4(running iOS 5.1), then I have included the script in my index.html like this :

<script type=”text/javascript” src="http://localhost:8080/target/target-script-min.js#anonymous"></script>

But on the Weinre client, I can't see any target connected. I have succeeded in seeing the content of my webpage one time when I used debug.phonegap.com for debugging this afternoon. Any idea on how to fix it ? Perhaps it is a network problem? I have tried to connect my iphone to Mac by usb and also connect the iphone and the Mac to the same WIFI access point.

Thanks in advance!


Solution

  • If you can update your iPhone to iOS 6 and Safari 6 on Mac, you can use safari on Mac to debug your mobile website or PhoneGap app: http://webdesign.tutsplus.com/tutorials/workflow-tutorials/quick-tip-using-web-inspector-to-debug-mobile-safari/

    its very easy and hassle free compared to using Weinre.