RESOLVED FIXED235274
Web Inspector: add a switch to control whether breakpoint evaluations (condition, ignore count, actions) are also affected by script blackboxing
https://bugs.webkit.org/show_bug.cgi?id=235274
Summary Web Inspector: add a switch to control whether breakpoint evaluations (condit...
Devin Rousso
Reported 2022-01-15 14:51:51 PST
being able to defer breakpoint evaluations until the next actual pause can sometimes be far more useful than doing the breakpoint evaluations at the breakpoint's original location
Attachments
Patch (54.35 KB, patch)
2022-01-15 14:53 PST, Devin Rousso
no flags
Patch (53.59 KB, patch)
2022-01-15 14:59 PST, Devin Rousso
ews-feeder: commit-queue-
Patch (54.48 KB, patch)
2022-01-15 15:03 PST, Devin Rousso
no flags
Patch (35.07 KB, patch)
2022-01-15 18:28 PST, Devin Rousso
no flags
Patch (54.74 KB, patch)
2022-01-21 15:17 PST, Devin Rousso
no flags
Patch (55.56 KB, patch)
2022-02-04 16:43 PST, Devin Rousso
no flags
Devin Rousso
Comment 1 2022-01-15 14:53:36 PST
EWS Watchlist
Comment 2 2022-01-15 14:54:43 PST
This patch modifies the inspector protocol. Please ensure that any frontend changes appropriately use feature checks for new protocol features.
Devin Rousso
Comment 3 2022-01-15 14:59:03 PST
Devin Rousso
Comment 4 2022-01-15 15:03:17 PST
Devin Rousso
Comment 5 2022-01-15 18:28:46 PST Comment hidden (obsolete)
Devin Rousso
Comment 6 2022-01-15 18:32:03 PST Comment hidden (obsolete)
Devin Rousso
Comment 7 2022-01-21 15:11:17 PST
Comment on attachment 449275 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=449275&action=review > Source/JavaScriptCore/debugger/Debugger.cpp:884 > bool pauseNow = m_pauseAtNextOpportunity; I think this might need to be updated to include `m_pauseOnStepNext` and `m_pauseOnStepOut` (and maybe `m_pauseOnCallFrame` for Step out) as possible signals to `pauseNow` as well. We should also probably only consider `m_pauseAtNextOpportunity` if we're not `m_afterBlackboxedScript` either. That's the only way for sure to know if we're stepping vs pausing because of a breakpoint. We shouldn't have to worry about things like "Continue to location" because that breakpoint is not configurable, and therefore can't be marked as auto-continue.
Devin Rousso
Comment 8 2022-01-21 15:17:31 PST
Radar WebKit Bug Importer
Comment 9 2022-01-22 14:52:16 PST
Patrick Angle
Comment 10 2022-01-31 15:29:04 PST
Comment on attachment 449700 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=449700&action=review Frontend changes LGTM with a nit and a question. Backend changes also look good to me, but is outside of my comfort zone to "r+". > Source/JavaScriptCore/debugger/Debugger.cpp:890 > + if (!afterBlackboxedScript) > + didPauseForStep = true; Nit: `didPauseForStep = !afterBlackboxedScript;`? > Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js:1265 > + // COMPATIBILITY (iOS 15): Debugger.setBlackboxBreakpointEvaluations did not exist yet. Nit: "iOS 15.4" > Source/WebInspectorUI/UserInterface/Views/BlackboxSettingsView.js:113 > + let blackboxBreakpointEvaluationsExplanationCheckbox = blackboxBreakpointEvaluationsExplanationLabel.appendChild(document.createElement("input")); Not sure if there is a precedent for what I'm about to suggest, but we should consider not showing this option when inspecting a pre-iOS 15.4 target. It might be a bit odd for this setting to only sometimes be here, but if someone is using the setting they might be more confused if the setting is here but doesn't do anything. At least if the setting they previously toggled while inspecting a different target is not there in an instance targeting a pre-iOS 15.4 debuggable it might provide a better clue as to why breakpoints aren't working they way the user might have expected. Thoughts?
Devin Rousso
Comment 11 2022-02-04 16:34:43 PST
Comment on attachment 449700 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=449700&action=review >> Source/WebInspectorUI/UserInterface/Views/BlackboxSettingsView.js:113 >> + let blackboxBreakpointEvaluationsExplanationCheckbox = blackboxBreakpointEvaluationsExplanationLabel.appendChild(document.createElement("input")); > > Not sure if there is a precedent for what I'm about to suggest, but we should consider not showing this option when inspecting a pre-iOS 15.4 target. It might be a bit odd for this setting to only sometimes be here, but if someone is using the setting they might be more confused if the setting is here but doesn't do anything. At least if the setting they previously toggled while inspecting a different target is not there in an instance targeting a pre-iOS 15.4 debuggable it might provide a better clue as to why breakpoints aren't working they way the user might have expected. Thoughts? Oh wow oops yeah I totally forgot to add a compatibility guard 🤦‍♂️ Good catch!
Devin Rousso
Comment 12 2022-02-04 16:43:46 PST
Patrick Angle
Comment 13 2022-03-01 16:42:43 PST
Comment on attachment 450950 [details] Patch I've re-reviewed since you've been having trouble finding a reviewer. rs=me.
EWS
Comment 14 2022-03-01 22:43:42 PST
Committed r290720 (247967@main): <https://commits.webkit.org/247967@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 450950 [details].
Note You need to log in before you can comment on or make changes to this bug.