4

After an upgrade to OSX 10.9.3 (13D65) and Safari 7.0.4 (9537.76.4), I am unable to set breakpoints in my cordova app using the Safari web inspector. Enabled breakpoints appear as dark grey, disabled as a lighter grey. "debugger" statements are ignored. The behavior is the same on either the simulator (iOS 7.1 11D167) or a physical device (iOS 7.1.1 11D201). The mobile app does show up under the Develop menu (iPad Simulator or xxx iPad). I can inspect the DOM. I tried the solutions suggested in this problem: Why is Web Inspector showing me "no inspectable applications"?, and this Why Safari shows "No Inspectable Applications" during remote debugging with iOS 6 device?.

The mobile app is compiled locally. It is debuggable on a second machine running the same versions of OSX & Safari, but I don't have access to that machine full time. Both machines have the same developer profiles and certificates (with private keys). How can I diagnose this?? Thank you for your help.

Community
  • 1
  • 1
meltemi
  • 141
  • 1
  • 6

2 Answers2

10

turns out that the issue was "Stop-plugins to save power" was enabled under Safari / Preferences (Advanced Tab). That disabled the ability to set a breakpoint. I don't recall setting that, but I didn't see anything indicating that the upgrade set that preference.

meltemi
  • 141
  • 1
  • 6
  • Thank you for figuring that out! I was not even seeing an option to remote debug any devices anymore and clearing that option did the trick (along with a restart of Safari). Was pulling the hair out of my head trying to figure out what I was not doing correctly... :) – xmnboy Jul 09 '14 at 00:44
  • Yup, this fixed it for me too. Thanks for the protip :) – jessepinho Mar 17 '16 at 16:00
  • @hashchange Thanks for choosing that username. I happened to be experiencing this issue but breakpoints worked except those inside my hashchange event handler. Had you chosen any other name, I doubt I'd have found this solution. – Walf Jan 13 '17 at 06:39
  • @Walf Lovely - and I can add "Impersonating a tag" to my life achievements now. ;) Cheers! – hashchange Jan 13 '17 at 10:54
2

It is also necessary to place your breakpoints on lines containing executable code.

Breakpoints on blank lines between other lines of code are ignored.

ElmerCat
  • 3,126
  • 1
  • 26
  • 34