Open Bug 989624 Opened 10 years ago Updated 2 years ago

Consider raising the preview limit for Objects

Categories

(DevTools :: Console, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: danemacmillan, Unassigned)

Details

Attachments

(1 file)

I think the Console truncates the output of collections too much--whether it be a collection of nodes, or an object or array of something. The maximum appears to be capped at 10, then there's a link to view the rest in the side panel. I really think the cap should be bumped up a lot, or removed altogether. I can definitely understand the need to set constraints on a UI to maintain its integrity, but on the other hand, I think when developers are explicitly dumping collections to the Console's log, they probably want to see all of it--in a big picture kind of way. In that sense, I think a console should be raw and gritty--providing exactly what it's told to provide, with only as much interpretation to make it more useful.

Personally, even on the rare occasions that a dump of collections exceeded 300, it never appeared like an unwieldy amount of data to look over.

For example, running `document.querySelectorAll('div')` on this page to submit a bug returns a collection of 130 nodes; 10 of them are dumped directly into the Console, and the other 120 must be viewed in the side panel. I don't think dumping all of them to the Console would be that chaotic.

Despite this, there is one thing I do like about viewing them in the side panel. It's makes hovering over all the nodes (to trigger the dashed selector) to find an area in the document faster, as you don't have to move the cursor horizontally because all the nodes are listed on their own line instead of being inline.
When I did set the cap to 10 I wasnt sure what's the best choice. After more usage, I would agree with bumping up to around 30 elements. I don't want too many, because you can easily eval something that outputs a *lot* of info. I want us to avoid cases when eval output is so long that you dont even see your previous input (anything taller than the current console output height).
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3
30 sounds like a good improvement. If the side panel eventually includes class names (bug 989629), then I think the relevance of having them all dumped to the console is diminished significantly. That would make the side panel of NodeLists much easier to find nodes, and generally superior to the console dump.
Product: Firefox → DevTools

Just tested and Chrome displays the first 100 items.

Type: defect → enhancement
Summary: Console output truncates collections (arrays, objects) too much. → Consider raison the preview limit for Objects

Fixing typo in short description.

Summary: Consider raison the preview limit for Objects → Consider raising the preview limit for Objects
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: