Skip to content

What state of the object the logging methods should display ? #19

Description

@fflorent

To illustrate the question, just enter this expression in the different Dev Tools Consoles:

var o = {a: 1, b: { c: 2 } };
console.log(o);
o.a = 3;

Some Dev Tools offer a preview of the object being logged. That is the case of Firebug and Chrome Dev Tools.
In Firebug:

>>> var o = {a: 1, b: { c: 2 } }; console.log(o); o.a = 3;
Object { a=1, b={...} }

And in Chrome :

> var o = {a: 1, b: { c: 2 } }; console.log(o); o.a = 3;
Object {a: 1, b: Object}

However:

  • When expanding the logged object in Chrome, the object state is displayed like at the first expansion ;
  • When clicking on the object in Firebug, the last state of the object is displayed.

However, in the Firefox Dev Tools or in Opera Dragonfly, the user has to click on the object to display its properties, and only the last state is displayed.

So, to sum up, the question of the title: What state of the object the logging methods should display on the Console logs ?

Some related problematics:

  • performance (how to avoid performance issues with the logging methods)
  • consistency (what state of the object the user wants to see?)
  • others?

Florent

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions