Logging Request Animation Frame (and other non actual event **listeners**) from Event Listener Breakpoints could be more helpful
Categories
(DevTools :: Debugger, defect, P3)
Tracking
(Not tracked)
People
(Reporter: nchevobbe, Unassigned)
References
Details
Steps to reproduce
- Navigate to https://nchevobbe.github.io/demo/console-test-app.html
- Open the debugger
- In the event listeners breakpoints panel, check "Request Animation Frame"
- Check the "Log" checkbox in the header
- Open the split console
- On the page, click on the
console.logbutton
Expected results
In the console, I can see useful logs for each time requestAnimationFrame was called
Actual results
I do see some logs, but they only show a Number, without any other label. I guess this is the requestAnimationFrame return value, but it would be nice to actually see requestAnimationFrame 2601102.92 , or maybe the reference to the callback function?
This is because in https://searchfox.org/mozilla-central/rev/08b2a1a770688df19a5a43fd89fb63b34bb2d6a6/devtools/server/actors/thread.js#902-908
return logEvent({
threadActor: this,
frame,
level: "logPoint",
expression: `[_event]`,
bindings: { _event: frame.arguments[0] },
});
We assume that we have an event, which is not the case here.
There's probably similar issue with other events breakpoints which are not actually event listeners breakpoint (e.g. cancel animation frame, script first statement, …)
Comment 1•11 months ago
|
||
The minimum is to add a label showing why the log was created (eg RequestAnimationFrame).
We can file a follow up to log more information if we have additional details we can consistently log here.
Description
•