RESOLVED FIXED 198932
Web Inspector: Debugger: adding a DOM/Event/URL breakpoint should enable breakpoints
https://bugs.webkit.org/show_bug.cgi?id=198932
Summary Web Inspector: Debugger: adding a DOM/Event/URL breakpoint should enable brea...
Devin Rousso
Reported 2019-06-17 13:56:31 PDT
# STEPS TO REPRODUCE: 1. inspect any page 2. disable breakpoints (navigation sidebar of Debugger/Sources tab) 3. create an Event/URL breakpoint => breakpoint starts out disabled
Attachments
Patch (5.09 KB, patch)
2019-06-17 14:24 PDT, Devin Rousso
no flags
Patch (5.63 KB, patch)
2019-06-17 15:44 PDT, Devin Rousso
no flags
Devin Rousso
Comment 1 2019-06-17 14:24:22 PDT
Matt Baker
Comment 2 2019-06-17 15:26:03 PDT
I'm not sure about this. What about the following scenario: 1. I disable breakpoints. Maybe a long running script kept pausing on some existing breakpoints, and interrupting my work. 2. I add a URL or event breakpoint. 3. This causes breakpoints to be enabled => Debugger pauses on one of my other breakpoints, interrupting me If a user disables breakpoints globally, we should respect it until they turn it back on. We already provide a warning to surface this state.
Devin Rousso
Comment 3 2019-06-17 15:41:50 PDT
(In reply to Matt Baker from comment #2) > I'm not sure about this. What about the following scenario: > > 1. I disable breakpoints. Maybe a long running script kept pausing on some existing breakpoints, and interrupting my work. > 2. I add a URL or event breakpoint. > 3. This causes breakpoints to be enabled > => Debugger pauses on one of my other breakpoints, interrupting me > > If a user disables breakpoints globally, we should respect it until they turn it back on. We already provide a warning to surface this state. This patch matches the behavior of regular breakpoints, which enable breakpoints globally when a new breakpoint is set or an existing breakpoint is enabled. If I'm setting a new breakpoint, it's likely the case that I'm going to soon thereafter trigger that breakpoint, and having to click twice (once to set the new breakpoint and once again to enable breakpoints globally) would be annoying. Another issue is that if I'm setting a DOM breakpoint or specific event listener breakpoint via the Node sidebar, there's no banner in the Elements tab that says "breakpoints disabled". I don't think we should add one anywhere in that tab either, as that's just "out of place" (DOM/elements vs JavaScript/debugging). Currently, setting a DOM breakpoint or a specific event listener breakpoint would basically "silently fail" (which is something that I got quite aggravated about earlier, hence this bug). I agree that the situation you describe isn't ideal, but I think the rest of the situations I've described here would have a much better experience with this change.
Devin Rousso
Comment 4 2019-06-17 15:44:56 PDT
Matt Baker
Comment 5 2019-06-17 15:56:38 PDT
(In reply to Devin Rousso from comment #3) > (In reply to Matt Baker from comment #2) > > I'm not sure about this. What about the following scenario: > > > > 1. I disable breakpoints. Maybe a long running script kept pausing on some existing breakpoints, and interrupting my work. > > 2. I add a URL or event breakpoint. > > 3. This causes breakpoints to be enabled > > => Debugger pauses on one of my other breakpoints, interrupting me > > > > If a user disables breakpoints globally, we should respect it until they turn it back on. We already provide a warning to surface this state. > This patch matches the behavior of regular breakpoints, which enable > breakpoints globally when a new breakpoint is set or an existing breakpoint > is enabled. I agree we should definitely be consistent across all our breakpoint types. I didn't know this also happened when enabling a breakpoint. > If I'm setting a new breakpoint, it's likely the case that I'm going to soon > thereafter trigger that breakpoint, and having to click twice (once to set > the new breakpoint and once again to enable breakpoints globally) would be > annoying. > > Another issue is that if I'm setting a DOM breakpoint or specific event > listener breakpoint via the Node sidebar, there's no banner in the Elements > tab that says "breakpoints disabled". I don't think we should add one > anywhere in that tab either, as that's just "out of place" (DOM/elements vs > JavaScript/debugging). Currently, setting a DOM breakpoint or a specific > event listener breakpoint would basically "silently fail" (which is > something that I got quite aggravated about earlier, hence this bug). Good point. > I agree that the situation you describe isn't ideal, but I think the rest of > the situations I've described here would have a much better experience with > this change. The situation I described was a hypothetical, and since we have established an existing behavior with script breakpoints let's go ahead!
Matt Baker
Comment 6 2019-06-17 15:58:41 PDT
Comment on attachment 372281 [details] Patch r=me. Nice detailed explanation in the change log.
WebKit Commit Bot
Comment 7 2019-06-17 16:42:47 PDT
Comment on attachment 372281 [details] Patch Clearing flags on attachment: 372281 Committed r246523: <https://trac.webkit.org/changeset/246523>
WebKit Commit Bot
Comment 8 2019-06-17 16:42:48 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 9 2019-06-17 16:45:06 PDT
Note You need to log in before you can comment on or make changes to this bug.