RESOLVED WONTFIX 90423
Web Inspector: Option to ignore exceptions/breakpoints during page unload
https://bugs.webkit.org/show_bug.cgi?id=90423
Summary Web Inspector: Option to ignore exceptions/breakpoints during page unload
James Darpinian
Reported 2012-07-02 18:44:31 PDT
Breakpoints and the "Pause on all exceptions" feature often delay page reload, because the page won't reload until you hit "continue" once for each breakpoint/exception hit during the page unload process. An option to ignore breakpoints and exceptions during page unload would really speed up "edit/reload" style iterative development.
Attachments
Patch (4.53 KB, patch)
2012-07-04 08:58 PDT, Vsevolod Vlasov
no flags
Patch (4.58 KB, patch)
2012-07-04 09:02 PDT, Vsevolod Vlasov
pfeldman: review-
Pavel Feldman
Comment 1 2012-07-03 03:09:05 PDT
Could you use "deactivate breakpoints" for that? Creating a dedicated action for such a corner case scenario does not sound great to me.
James Darpinian
Comment 2 2012-07-03 12:18:40 PDT
This is hardly a corner case; it happens all the time when you are paused at a breakpoint and want to reload the page. Pressing reload will continue past one breakpoint at a time, but if you have multiple breakpoints (or exceptions) you have to hit reload over and over before the page will actually reload. But if you hit it too many times you will interrupt the next page load, so you have to be really careful. Using "deactivate breakpoints" and disabling "Pause on exceptions" every single time you want to reload the page is a chore, and it's impossible if you're debugging page load issues because you don't have time to re-enable them before the page re-loads.
Andrey Adaikin
Comment 3 2012-07-04 01:04:02 PDT
FYI, I faced the same problem couple of times, and tend to agree with James on the request. Quite hard to workaround existing behavior. Although adding a new option to "ignore on reload" seems too complex. Maybe we should just disable all breakpoints upon hitting the Reload button until the page starts being loaded again? or have two different behaviors, for example, on Ctrl+R and Ctrl+Shift+R?
Pavel Feldman
Comment 4 2012-07-04 05:25:12 PDT
> Although adding a new option to "ignore on reload" seems too complex. Maybe we should just disable all breakpoints upon hitting the Reload button until the page starts being loaded again? or have two different behaviors, for example, on Ctrl+R and Ctrl+Shift+R? Sounds good to me.
Vsevolod Vlasov
Comment 5 2012-07-04 08:58:51 PDT
Vsevolod Vlasov
Comment 6 2012-07-04 09:00:20 PDT
This patch does not change behavior for ctrl-r or f5 pressed when focused on inspected window, but since inspector receives focus on pause in docked mode this will make a large part of the users happy.
Vsevolod Vlasov
Comment 7 2012-07-04 09:02:16 PDT
Pavel Feldman
Comment 8 2012-07-04 09:43:02 PDT
Comment on attachment 150810 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=150810&action=review > Source/WebCore/inspector/front-end/inspector.js:736 > +WebInspector.reloadPage = function(ignoreCache, scriptToEvaluateOnLoad) Could we move this method to the debuggerModel? It seems to call into it with every line. > Source/WebCore/inspector/front-end/inspector.js:740 > + setTimeout(WebInspector.debuggerModel.setBreakpointsActive.bind(WebInspector.debuggerModel, true), 0); Front-end timer is not synchronized with inspected page / protocol, so you should not need it. I would do setBreakpointsActive(false); PageAgent.reload() setBreakpointsActive(true);
Pavel Feldman
Comment 9 2012-08-02 06:44:17 PDT
piersh
Comment 10 2012-10-09 10:49:39 PDT
two points 1) how about refreshing the page by re-typing the URL (or just hitting enter in the address bar)? currently this also exhibits the stop-at-breakpoint problem. 2) how about debugging 'onbeforeunload' scripts?
Note You need to log in before you can comment on or make changes to this bug.