Closed Bug 1952622 Opened 8 months ago Closed 8 months ago

devtools/debug/watch doesn't show variables assigned 0 or false - shows (unavailable) instead

Categories

(DevTools :: Debugger, defect, P2)

Firefox 137
defect

Tracking

(firefox138 fixed)

RESOLVED FIXED
138 Branch
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:

  1. open new tab
  2. open dev tools
  3. go to https://ewnjtgouierg.github.io/ffbugs/WatchZeroOrFalse.html - it will open Debugger tab because of a debugger directive
  4. 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

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.

Component: Untriaged → Debugger
Product: Firefox → DevTools

behavior is the same when you stop execution with debugger before the assignment and step through it

same with stopping on a regular breakpoint

Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P2
Assignee: nobody → hbenl
Status: NEW → ASSIGNED

Note that empty strings are also shown as unavailable.
Simplified STRs:

  • open devtools
  • add a (constant) watch expression 0, false or ""
Pushed by hbenl@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3b5132ab4e0c [devtools] Don't show falsy values as unavailable in the watch expressions panel. r=nchevobbe,devtools-reviewers
Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 138 Branch
Duplicate of this bug: 1954365
Duplicate of this bug: 1917973
Duplicate of this bug: 1956016
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: