devtools: implement pause and resume in debugger#42580
Conversation
eerii
left a comment
There was a problem hiding this comment.
I think this is going in the right direction, we need a loop like this. But it is blocking all of the messages while being paused, causing panics. For example, if you try to hover over some text while paused, the console actor panics because it is trying to call the evaluate JS message.
We may need to look for another way of blocking execution, but keep the handle_msgs function from script thread running, which is the one handling all of the communication.
it did not panic for me while performing pause/resume events. I will try out the console events. This needs a bit more thinking i guess!! |
a472f5c to
e505d69
Compare
|
Previous approach wasn't right. This one feels much better. The No crashes so far. Will be writing tests to make sure everything holds up! TODO:
|
e505d69 to
4918621
Compare
|
@eerii I think this is ready for review now |
eerii
left a comment
There was a problem hiding this comment.
Looks great! :) Ran it locally and both the functionality and the test works.
As we talked, the next step is to unify the handling of breakpoints and manual pausing. For that I think we might need to reorder and rename some functions, but I think it is best to merge this working version now and do the rest incrementally.
yess, let's not do the refactoring part in this PR. You are already doing it in #42599, so it would be nice to keep it separate :) |
4918621 to
8107ba7
Compare
When a breakpoint is hit, the script thread now pauses execution and notifies devtools clients with a "paused" event. The script thread enters a loop that processes devtools messages until a Resume command is received. This change does not implement manual pause Signed-off-by: atbrakhi <atbrakhi@igalia.com>
8107ba7 to
17cf445
Compare
|
excellent work! the screen recording is wonderful too, would it be ok for me to use it in the monthly update? no worries at all if you would prefer not to for any reason :) |
@delan yeah feel free :) |
When a breakpoint is hit, the script thread now pauses execution and
notifies devtools clients with a "paused" event. The script
thread enters a loop that processes devtools messages until
a Resume command is received.
This change does not implement manual pause
Testing: Added new test
Fixes: part of #36027
Screen.Recording.2026-02-17.at.12.22.09.mov