Closed Bug 966177 Opened 11 years ago Closed 11 years ago

Show the content of Set and Map

Categories

(DevTools :: Console, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 862583

People

(Reporter: kohei, Unassigned)

Details

It would be nice if the Console can show the content of a ES6 Set, Map and WeakMap, like an Object or Array. Currently it only shows the size of the object.
I guess we could use nondeterministicGetWeakMapKeys for WeakMaps, but I'm entirely sure it's a good idea to do so for our VariablesView. :) Worst case scenario, you could inspect an weak map and some of its contents become gc'd while you're inspecting it.
The console does previews for Set and Map, like it does for Arrays/Objects. WeakMaps do not get the special treatment. Kohei: do you want to see the set/map elements in the object inspector, in the sidebar?
Summary: Show the content of Set, Map, WeakMap → Show the content of WeakMap
I think, he means the variables view in console (and other places too) and not the pretty output.
Summary: Show the content of WeakMap → Show the content of Set, Map, WeakMap
In comment 1 I meant to say "I'm *not* entirely sure". Using nondeterministicGetWeakMapKeys is most likely a bad idea in this particular case.
WeakMap is something special, so let's do this for Set and Map first. It would be helpful for developers who are interested in ES6.
Summary: Show the content of Set, Map, WeakMap → Show the content of Set and Map
As Mihai said, the console is already handling this for Maps and Sets. If we're talking about showing this in the VariablesView, we have a bug 862583 for that.
Oh cool, thanks.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.