Closed
Bug 1363328
Opened 7 years ago
Closed 5 years ago
for-loop variable shown with wrong value in Debugger Scopes/Variables view
Categories
(DevTools :: Debugger, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: account-mozilla-bugzilla, Unassigned)
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0 Build ID: 20170418123106 Steps to reproduce: 1. Open attached example.html in Firefox 53.0 or Firefox Developer Edition 54.0a2 (both affected). 2. Open Developer Tools, go to Debugger. 3. Set breakpoints in lines 7, 11, and 15 (for loops). 4. Reload to hit first breakpoint. 5. See debugger Variables/Scopes view. 6. Resume to hit next loop, see debugger Variables/Scopes view again. 7. Resume to hit last loop, see debugger Variables/Scopes view again. Actual results: - Variable k of second loop is shown with value 3 in debugger. - Variable a of third loop is shown with value 7 in debugger. Expected results: - k should be either undefined in debugger (like in first loop) or show value after initialization with let k = 4 - a should be either undefined in debugger (like in first loop) or show value after initialization with let a = "" Note: It seems the value shown in the Debugger is the last value of the previous for loop's variable. Note: This bug appears even when the loop variables have different names (compare "i" of first loop with "k" of second). Note: This bug appears even when the loop variable have different types (compare typeof k === number with typeof a === string)
Reporter | ||
Updated•7 years ago
|
Component: Untriaged → Developer Tools: Debugger
Reporter | ||
Comment 1•7 years ago
|
||
Reporter | ||
Comment 2•7 years ago
|
||
I have fiddled with the bug a bit more and found an even simpler test case that exposes it: { let a = "foo"; } { let b = 42; // set breakpoint here: debugger shows b == "foo"! } Note that _b_ is shown in the second block with the value of _a_ from the first block, even both are completely unrelated!
Comment 3•7 years ago
|
||
Definitely seeing this in Nightly as well, test case here: https://gist.github.com/clarkbw/bd45805e9498faa591dd102cae09571a Our guess is that this is a platform or server bug
Status: UNCONFIRMED → NEW
Ever confirmed: true
Updated•6 years ago
|
Product: Firefox → DevTools
Comment 4•5 years ago
|
||
Flags: needinfo?(account-mozilla-bugzilla)
Reporter | ||
Comment 5•5 years ago
|
||
Hi Jason, sorry for the late reply.
I can reproduce the bug with 66.0.5 (64-bit) on Ubuntu, but not with the most recent nightly: 68.0a1 (2019-05-13) (64-Bit). So it seems fixed indeed! Thanks a lot and keep up the great work :)
Flags: needinfo?(account-mozilla-bugzilla)
Updated•5 years ago
|
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•