script-lab icon indicating copy to clipboard operation
script-lab copied to clipboard

console object is not correctly displayed

Open sdudnic opened this issue 3 years ago • 0 comments

The details of an object in console (with ">Object" pin image) when using console.log(myObject) are not correctly displayed.

When opening the pin, the displayed properties and keys corresponds to last available state of the object, not the state of the object in the time of console.log.

main idea

let x = {a: 1, b: 2, c: 3, d: 4, e: 5};
console.log(x); // when unpinning, should be {a: 1, b: 2, c: 3, d: 4, e: 5}, no z!
x.z = 2000
console.log(x); // only now z should appear

Bug Report

  • Host: EXCEL
  • OS: Windows 10
  • Browser: -
  • Environment: prod

Expected behavior:

as described in comments

Actual behavior:

image

Steps to Reproduce:

open a script in Excel, and do in the main function:

let x = {a: 1, b: 2, c: 3, d: 4, e: 5};
console.log(x); // when unpinning, should be {a: 1, b: 2, c: 3, d: 4, e: 5}, no z!
x.z = 2000
console.log(x); // only now z should appear

Screenshot:

image

sdudnic avatar Oct 14 '22 16:10 sdudnic