Repository navigation
devtools: Implement debugger Eval event - #42306
Conversation
Co-authored-by: eri <[email protected]> Signed-off-by: atbrakhi <[email protected]>
f0229ea to
d9a7b75
Compare
d9a7b75 to
168ba9f
Compare
Co-authored-by: eri <[email protected]> Signed-off-by: atbrakhi <[email protected]>
168ba9f to
e57be17
Compare
Eval eventEval event
| // <https://firefox-source-docs.mozilla.org/js/Debugger/Debugger.Object.html#executeinglobal-code-options> | ||
| addEventListener("eval", event => { | ||
| const {code, pipelineId: {namespaceId, index}, workerId} = event; | ||
| let object = debuggeesToPipelineIds.keys().next().value; |
There was a problem hiding this comment.
Shouldn't we be getting a specific key from the map, not just the first one?
There was a problem hiding this comment.
yes, we already have a patch for this in upcoming PR. initially we left it this way thinking we have only one debuggee so should be alright but we realize in our upcoming changes that it's better to take care of this!
|
hi! i’m preparing the monthly update, and i was wondering if this patch changes the way devtools behaves for the end user in any way? or is expected to enable some future extension to our behaviour? |
|
Hi! This alone doesn't change anything, but it was preparatory work for #42936. That one does make a difference for the end user. Now when you are paused on the debugger and you hover over variables you can see the values they have at that point in time. There's also #42994 and #42996 which improve this popup overview. |
Replace the
EvaluateJSfunction to usedebugger.jsEvalevent and the proper context. This takes the global context and calls executeInGlobal.In future we also add the version that takes a frame and calls eval.
Testing: No new tests added yet, Old tests are not impacted by this change.
Fixes: Part of #36027