Debugger preview popup evaluates `values` as the console helper, not the actual value
Categories
(DevTools :: Debugger, defect, P2)
Tracking
(firefox-esr115 unaffected, firefox122 wontfix, firefox123 wontfix, firefox124 fixed)
Tracking | Status | |
---|---|---|
firefox-esr115 | --- | unaffected |
firefox122 | --- | wontfix |
firefox123 | --- | wontfix |
firefox124 | --- | fixed |
People
(Reporter: nchevobbe, Assigned: ochameau)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
Steps to reproduce
- Navigate to
data:text/html,<meta charset=utf8><script>const values = [1,2,3]; debugger</script>
- Open the debugger
- Reload the page, the debugger should pause
- In the opened source, hover
values
Expected results
The preview shows that it's an array
Actual results
The preview says that values
is a function, which makes me think it returned the console helper (I'm seeing the same issue with $
, which is another console helper)
Updated•10 months ago
|
Assignee | ||
Comment 1•10 months ago
|
||
It was probably meant to be handled by the useInnerBindings
flag:
https://searchfox.org/mozilla-central/rev/2c3d657cbba5484ccac44443c4417baed7b5fafb/devtools/server/actors/webconsole/eval-with-debugger.js#203-207
So either we aren't setting this flag, or it doesn't work as expected?
Reporter | ||
Comment 2•10 months ago
|
||
Looks like this was regressed by Bug 1847222
Comment 3•10 months ago
|
||
Set release status flags based on info from the regressing bug 1847222
Assignee | ||
Comment 4•10 months ago
|
||
We can't strictly rely on the existing disableBreaks
attribute.
We should probably have a new RDP attribute to distinguish frontend evaluation involving console commands.
Only them should enforce overriding local symbols in scope with the console commands.
Assignee | ||
Updated•10 months ago
|
Assignee | ||
Comment 5•10 months ago
|
||
We should probably expose new RDP methods to prevent relying on console evaluations for this.
We would still have some potential issues if the evaluated method is about a JS symbol
whose name is the console command.
Comment 7•10 months ago
|
||
bugherder |
Updated•10 months ago
|
Comment 8•10 months ago
|
||
The patch landed in nightly and beta is affected.
:ochameau, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- If no, please set
status-firefox123
towontfix
.
For more information, please visit BugBot documentation.
Assignee | ||
Updated•10 months ago
|
Updated•10 months ago
|
Description
•