bradgonesurfing
bradgonesurfing

Reputation: 32192

Is it possible with Weinre to set javascript breakpoints when debugging iOS webviews

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?

Upvotes: 3

Views: 3600

Answers (3)

lbrutti
lbrutti

Reputation: 1183

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.

Upvotes: 0

B Robster
B Robster

Reputation: 42063

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

Upvotes: 3

Simon MacDonald
Simon MacDonald

Reputation: 23273

No, it is not possible to set breakpoints with weinre.

Upvotes: 8

Related Questions