devtools/debug/watch doesn't show variables assigned 0 or false - shows (unavailable) instead
Categories
(DevTools :: Debugger, defect, P2)
Tracking
(firefox138 fixed)
| Tracking | Status | |
|---|---|---|
| firefox138 | --- | fixed |
People
(Reporter: jaborandi, Assigned: hbenl)
References
Details
Attachments
(1 file)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:136.0) Gecko/20100101 Firefox/136.0
Steps to reproduce:
- open new tab
- open dev tools
- go to https://ewnjtgouierg.github.io/ffbugs/WatchZeroOrFalse.html - it will open Debugger tab because of a debugger directive
- add these in Watch pane:
a
b
c
d
a+1
a===0
Actual results:
a: (unavailable)
b: (unavailable)
c: null
d: 1
a+1: 1
a===0: true
Expected results:
a: 0
b: false
c: null
d: 1
a+1: 1
a===0: true
Comment 1•8 months ago
|
||
The Bugbug bot thinks this bug should belong to the 'DevTools::Debugger' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
| Reporter | ||
Comment 2•8 months ago
|
||
behavior is the same when you stop execution with debugger before the assignment and step through it
| Reporter | ||
Comment 3•8 months ago
|
||
same with stopping on a regular breakpoint
Comment 4•8 months ago
•
|
||
Looks like this relates around
https://searchfox.org/mozilla-central/rev/b0e8e4ceb46cb3339cdcb90310fcc161ef4b9e3e/devtools/client/debugger/src/utils/expressions.js#48-50
We could be better at handling falseys
| Assignee | ||
Comment 5•8 months ago
|
||
It's actually due to !valueGrip on this line: https://searchfox.org/mozilla-central/rev/b0e8e4ceb46cb3339cdcb90310fcc161ef4b9e3e/devtools/client/debugger/src/utils/expressions.js#54
Updated•8 months ago
|
| Assignee | ||
Updated•8 months ago
|
| Assignee | ||
Comment 6•8 months ago
|
||
Note that empty strings are also shown as unavailable.
Simplified STRs:
- open devtools
- add a (constant) watch expression
0,falseor""
| Assignee | ||
Comment 7•8 months ago
|
||
Comment 9•8 months ago
|
||
| bugherder | ||
Description
•