I'm using weinre to debug a phonegap application. However it doesn't seem possible to step through the JS or set breakpoints. Is this at all possible?
3 Answers
No, it is not possible to set breakpoints with weinre.

- 23,253
- 5
- 58
- 74
-
thanks. Is it still nowdays not possible neither you know any other solution? Now I'd like to be able to set breakpoint when using my phonegap WindowsPhone app – eeadev Jan 20 '15 at 11:33
No is the correct answer. And the "secret XCode UIWebView" mentioned in the other answer doesn't work any more. BUT ...
You can now throw the Weinre out the window because, with the release of iOS 6, Apple released remote mobile Web Inspector for Safari, and this is HUGE for anyone who's been struggling to debug their iOS mobile apps. Basically you have all the features and power of regular Safari Web Inspector--including Breakpoints--for your mobile apps, including WebView & Phonegap apps. I've used weinre quite a bit, and this makes it completely obsolete for these purposes, since the new remote Web Inspector is a full-featured, native debugger.
Here's how it works (requires a Mac, xCode 4.5+ running an iOS 6 simulator (or an attached iOS 6 device, I think), and Safari 6+ on your Mac:
In your ios6 simulator/device, Settings --> Safari --> Advanced --> Web Inspector --> On (this is On by default in the simulator).
In Safari, access iPhone/iPad Simulator from the Develop menu and see your page. You can enable the Develop menu in Safari's Advanced Preferences if you don't see it.
More discussion at the bottom of: http://www.mobilexweb.com/blog/iphone-5-ios-6-html5-developers

- 40,605
- 21
- 89
- 122
-
Note: weinre is still useful to (limitedly) debug any non-iOS webkit mobile browsers or for iOS simulators that are pre-6.0. So, I imagine it will still be non-obsolete for those purposes for a while to come. – B Robster Oct 01 '12 at 17:46
-
2
-
Pretty sure developing iOS webviews is, by definition, Mac-only, which is what the question is asking about ... (but obviously Weinre has other uses outside of iOS--that's just irrelevant to this question) – B Robster Nov 23 '12 at 14:14
even if this an old question, maybe someone is still struggling with iOS debugging from windows (as i was until today...:D).
I found this quite good solution: https://www.genuitec.com/products/gapdebug/
You can install apps from ipa and debug all the code usually obfuscated by Safari.

- 1,181
- 13
- 19