Open Bug 1541525 Opened 6 years ago Updated 2 years ago

Inconsistent behavior when displaying objects whose values are changing

Categories

(DevTools :: Console, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: julienw, Unassigned)

References

Details

Attachments

(1 file)

STR:

  1. open the attachment.
  2. open the console.
  3. type "globalObject" then ENTER to display the value of this object
  4. After at least 1 second, expand the object
    => notice the value displayed is different -- it's now the new one.
  5. Then collapse it again.
    => the previous value is displayed.

Then you can try to expand and collapse repeatidly, and you'll notice the 2 values don't move anymore.

At the very least, the 2 displayed values should be the same, preferably the values when it's first displayed.

It would be nice to have a "refresh" button to get the newer values, but this is not a must.

Note: I got this problem while working with the Selection object, that we get with window.getSelection(), because the same object is mutated by the browser's internal machinery.

The root bug is Bug 1188668.
I agree we could refresh the top node in the object inspector though (with an icon having a title attribute explaining the object was re-evaluated at 13:37)

Priority: -- → P3
See Also: → 1188668

To give a quick feedback, I think this is quite useful to have and keep the value of when the console.log happens. I think that's what the reporter also said in bug 1188668:

Expected behavior:
Show the empty array state at the moment of printing it.

So my piece of advice would be to not refresh the top node but instead keep its values.

That said, I also totally understand why it's difficult and could have performance problems...

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: