console-panel icon indicating copy to clipboard operation
console-panel copied to clipboard

Issue with circular references in objects

Open hybridherbst opened this issue 3 years ago • 1 comments

Hi, I looked into replacing our console panel with this one, but it seems it fails with circular references in objects: image

To reproduce, just log any object with circular refs (e.g. in our case a three.js object that has a parent which in turn has childs etc.)

hybridherbst avatar Nov 22 '22 15:11 hybridherbst

@hybridherbst Thank you for the report 🙏

For example: If we go to https://raw.githack.com/webextensions/console-panel/master/demo/demo.html and run the following code in the browser console:

var abc = {val: 123};
abc.abc = abc;
console.log(abc);

Then we can see the following output in console-panel:

Object {2}
    abc: "[Circular]"
    val: 123

So, it seems that the simple cases of circular objects work fine.

Can you provide the exact steps to reproduce? Probably via any of the following:

  • https://codepen.io/
  • https://codesandbox.io/
  • https://jsbin.com/
  • https://jsfiddle.net/
  • https://replit.com/
  • https://stackblitz.com/

webextensions avatar Nov 22 '22 19:11 webextensions