NEW 143577
Web Inspector: breakpoints set in IIFE closures via GUI do not fire
https://bugs.webkit.org/show_bug.cgi?id=143577
Summary Web Inspector: breakpoints set in IIFE closures via GUI do not fire
Joey Korkames
Reported 2015-04-09 14:21:36 PDT
Occasionally I need to tear into readonly remote-hosted JS code to isolate and report bugs on webapps I use. Single-page-application sites now commonly enclose their entire app code into an IIFE, adding nothing to the global scope that can be probed using the console. (function () { true; }() ) or !function(){ true; }() Web Inspector will let me click to set breakpoints inside IIFEs but they will never fire when the site feature that was breakpointed is engaged. Breakpointing the same lines in Chrome, Opera and Firefox works and provides console access to the stack inside the IIFE closure. It makes no difference whether the script file was minified (and subsequently prettified by Web Inspector) or not. None of the sites I am debugging have source-maps available. The only way I can currently debug such sites on Safari is by saving a WebArchive and manually editing scripts' WebResourceData to insert `debugger;` statements: webarchive-vim is a python script I wrote to streamline this.
Attachments
script for editing individual resources in webarchives (1.60 KB, text/plain)
2015-04-09 14:22 PDT, Joey Korkames
no flags
Radar WebKit Bug Importer
Comment 1 2015-04-09 14:21:55 PDT
Joey Korkames
Comment 2 2015-04-09 14:22:49 PDT
Created attachment 250467 [details] script for editing individual resources in webarchives
Note You need to log in before you can comment on or make changes to this bug.