Commit Graph

4 Commits

Author SHA1 Message Date
eri
b2b27d857b devtools: Avoid creating unnecessary new frame actors (#42906)
Before we were creating a new frame actor each time we paused, even if
the frame object in debugger.js was the same. Now we avoid this by
reusing the same frame actor id.

This helps our upcoming work on onStep, onPop, and onEnterFrame hooks.

Testing: Ran `mach test-devtools` and manually check that it works
Part of: #36027

Signed-off-by: eri <eri@igalia.com>
Co-authored-by: atbrakhi <atbrakhi@igalia.com>
2026-02-27 14:34:18 +00:00
atbrakhi
433d0acd0e devtools: Make why attribute use PauseReasons (#42878)
devtools: Make `why` attribute use `PauseReasons`

Currently we have why attribute hardcoded as per the event. In this PR
we introduce `PAUSE_REASON` and make sure `why` attribute is using
`PAUSE_REASONS`.

This is in order to support the upcoming work on `onStep`, `onPop`, and
`onEnterFrame` hook.

Testing: all existing tests are passing
Fixes: Part of #36027

Signed-off-by: atbrakhi <atbrakhi@igalia.com>
Co-authored-by: eri <eri@igalia.com>
2026-02-27 09:22:33 +00:00
eri
a2f1c55676 devtools: Register frame actor before pause (#42844)
We need a map between frame actor ids (from devtools) and frame objects
(from debugger.js) to implement stepping hooks in the future.

To achieve this, we register the frame actor with a call to the devtools
before entering the event loop when the debugger is paused. Instead of
creating the frame actor in `handle_debugger_pause`, we create it
before.

Testing: It passes existing devtools tests
Part of: #36027

Signed-off-by: eri <eri@igalia.com>
Co-authored-by: atbrakhi <atbrakhi@igalia.com>
2026-02-26 09:24:04 +00:00
eri
92259af702 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>
2026-02-23 09:29:59 +00:00