devtools: Unify pause handling for breakpoints and interrupt (#42599)

The pause debugger screen should be shown for both pausing manually
(interrupt) and hitting a breakpoint.

Reuse the logic for pausing breakpoints to pause the debugger when the
user manually clicks the pause button.

Rename the pause event to interrupt to match the language of the
DevTools client and to avoid confusion with paused frames, which can
happen on interrupt or on a breakpoint.


https://github.com/user-attachments/assets/ceb0007d-0e57-44d6-a159-55980ff8b517

Testing: New DevTools test and manual testing.
Part of: #36027

cc @atbrakhi

---------

Signed-off-by: eri <eri@igalia.com>
Co-authored-by: atbrakhi <atbrakhi@igalia.com>
This commit is contained in:
eri
2026-02-23 10:29:59 +01:00
committed by GitHub
parent f99d9689b8
commit 92259af702
13 changed files with 149 additions and 178 deletions

View File

@@ -0,0 +1,26 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
// This interface is entirely internal to Servo, and should not be accessible to
// web pages.
[Exposed=DebuggerGlobalScope]
interface DebuggerInterruptEvent : Event {};
partial interface DebuggerGlobalScope {
undefined pauseAndRespond(
PipelineIdInit pipelineId,
PausedFrame result,
boolean is_breakpoint);
};
dictionary PausedFrame {
required unsigned long column;
required DOMString displayName;
required unsigned long line;
required boolean onStack;
required boolean oldest;
required boolean terminated;
required DOMString type_;
required DOMString url;
};