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.
Could you use "deactivate breakpoints" for that? Creating a dedicated action for such a corner case scenario does not sound great to me.
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.
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?
> 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.
Created attachment 150807 [details]
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.
Created attachment 150810 [details]
Comment on attachment 150810 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=150810&action=review
> +WebInspector.reloadPage = function(ignoreCache, scriptToEvaluateOnLoad)
Could we move this method to the debuggerModel? It seems to call into it with every line.
> + 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
Downstream bug: http://code.google.com/p/chromium/issues/detail?id=134310
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?