New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 2 users

Issue metadata

Status: Fixed
User never visited
Closed: Dec 2013
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Sign in to add a comment

Issue 289348: DevToools: console: `copy()` should JSON.stringify objects instead of returning '[object Object]'

Reported by, Sep 11 2013

Issue description

This is in response to this tweet thread:

Chrome Version       : 29.0.1547.65 (Official Build 220622) 

What steps will reproduce the problem?
1. Open the Console in the Dev Tools.
2. Type the following and hit enter: copy({foo: "bar"})
3. Paste the output anywhere.

What is the expected result?

      foo: "bar"

What happens instead?
You get: [object Object]


It's not a huge issue or anything, but it would just be really neat to not have to do `copy(JSON.stringify(obj, null, 2))`.

I've got a working example of how to test for this here if it could be of any use:

Comment 1 by, Sep 12 2013

Labels: Cr-Platform-DevTools Cr-Platform-DevTools-JavaScript
Summary: DevToools: console: `copy()` should JSON.stringify objects instead of returning '[object Object]' (was: Enhance the `copy` function to JSON.stringify objects instead of returning '[object Object]')
I've heard this a few times. Some clever sugar.

Comment 2 by, Sep 12 2013

Wish I could take credit for the 'clever sugar', but that's all thanks to the jQuery guys :P

Not sure if I can edit the original report, but this link is better (shows the correct panes in jsbin):,console

Comment 3 by, Sep 16 2013

Status: Assigned
To summarize:

- copy(Node) copies markup
- copy(JSON.stringify-able) copies JSON
- copy(obj) copies String(obj)


Comment 4 by, Sep 16 2013

Sounds about right to me :)

Comment 5 by, Dec 3 2013

Status: Started

Comment 6 by, Dec 6 2013

Project Member

Comment 7 by, Dec 6 2013

Status: Fixed

Sign in to add a comment