Bug 20803 - JS objects in the console should be snapshots instead of live objects
Summary: JS objects in the console should be snapshots instead of live objects
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2008-09-12 11:36 PDT by Ojan Vafai
Modified: 2016-02-18 10:35 PST (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ojan Vafai 2008-09-12 11:36:14 PDT
This matches user-expectation better and solves problems of needing to keep anonymous or otherwise unreferenced objects from being garbage collected.
Comment 1 BJ Burg 2014-01-26 11:44:44 PST
I don't think this should be the default. But, maybe it could be an option for some RemoteObject uses, like objects from breakpoint actions.
Comment 2 Radar WebKit Bug Importer 2014-01-26 11:44:52 PST
<rdar://problem/15911174>
Comment 3 Timothy Hatcher 2014-01-26 16:28:19 PST
Works fine now. We fixed this.
Comment 4 Timothy Hatcher 2014-01-26 16:28:32 PST
Wrong bug.
Comment 5 Iraê 2015-09-01 16:35:02 PDT
I think being the default is a good idea. I constantly have to console.log(JSON.stringify(obj)) to understand better large applications with a lot of different states.

When I want just a reference to the object itself I can console.log outside of the app lifecycle or assign it to window.copyOfObj = obj;
Comment 6 Timothy Hatcher 2015-09-01 16:43:51 PDT
Is this better in the nightly / Safari 9 now that we have snapshot previews?
Comment 7 Timothy Hatcher 2016-02-18 10:35:15 PST
Object previews fixed this for what most developers expect and are satisfied with in other browsers.