Previous calls to console.log(array) are being overwritten with new data
Categories
(DevTools :: Console, defect)
Tracking
(Not tracked)
People
(Reporter: busterdasch, Unassigned)
Details
Attachments
(1 file)
(deleted),
text/html
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0
Steps to reproduce:
Using the Firefox debugging tools:
Wrote a test script for a JavaScript function, logged to the console before and after invoking. See attached file.
I have logged to the console before and after modifying an array by reference. When expanding the UI in the console to display array data, I am seeing both logs containing the same array data. The heading used to collapse/expand shows proper array length: 9 and 6, but the contents of the nine-long array consists of only six items.
When step debugging I get the same defect ONLY if I don't expand the arrays. If I allow the console to print the first item, expand it and then continue through the rest; the arrays will show properly.
Actual results:
The first array printed to the console (before invoking the function) displays results expected after invoking the function. The second array also displays results expected after invoking the function.
Chrome 91 is displaying the same results (making me question my sanity.)
Expected results:
The first array printed to the console should display the same array defined in the attached test.html. The second array printed to the console should show the modified array.
Comment 1•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'DevTools::Console' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Comment 2•3 years ago
|
||
This looks like the same issue as Bug 1505304.
You can try the workaround defined in https://bugzilla.mozilla.org/show_bug.cgi?id=1505304#c1
Description
•