console.table() should not have a limit number of columns.

NEW
Unassigned

Status

DevTools
Console
P2
normal
4 years ago
a month ago

People

(Reporter: u443210, Unassigned)

Tracking

35 Branch
x86
Windows XP

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [polish-backlog])

(Reporter)

Description

4 years ago
User Agent: Mozilla/5.0 (Windows NT 5.1; rv:35.0) Gecko/20100101 Firefox/35.0
Build ID: 20140915030204

Steps to reproduce:

-Open the web console.
-Copy and paste this: 

     foo = {
	bar1: {
		prop1: 1,
		prop2: 2,
		prop3: 3,
		prop4: 4,
		prop5: 5,
		prop6: 6,
		prop7: 7,
		prop8: 8,
		prop9: 9,
		prop10: 10,
		prop11: 11,
		prop12: 12,
		prop13: 13,
		prop14: 14,
		prop15: 15,
		prop16: 16,
		prop17: 17,
		prop18: 18,
		prop19: 19,
		prop20: 20
	},

	bar2: {
		prop1: 1,
		prop2: 2,
		prop3: 3,
		prop4: 4,
		prop5: 5,
		prop6: 6,
		prop7: 7,
		prop8: 8,
		prop9: 9,
		prop10: 10,
		prop11: 11,
		prop12: 12,
		prop13: 13,
		prop14: 14,
		prop15: 15,
		prop16: 16,
		prop17: 17,
		prop18: 18,
		prop19: 19,
		prop20: 20
	}
    }
    console.table(foo)


Actual results:

The max number of columns displayed is 10.


Expected results:

Should not have a limit number of columns.
(Reporter)

Updated

4 years ago
Component: Untriaged → Developer Tools: Console
(Reporter)

Updated

4 years ago
Blocks: 899753

Comment 1

4 years ago
+1. I know this is a newer feature for dev tools, but limiting the number of columns makes it really confusing if you're inspecting an object with more properties than that limit, with no indication that there are more properties on the object than are enumerated in the table.
Whiteboard: [p
Whiteboard: [p → [polish-backlog]
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P2

Comment 2

a year ago
I wonder what the correct behavior would be.
Also I note that Chrome allows 20 columns.

For the new console the value seems readily changed, but my naive attempt did not immediately work.
https://dxr.mozilla.org/mozilla-central/rev/e03e0c60462c775c7558a1dc9d5cf2076c3cd1f9/devtools/client/webconsole/new-console-output/components/console-table.js#19

Comment 3

a year ago
Ideally, text in the table cells can wrap to more than one line (which could leave room for more columns, and fixes the problem of content being cut off with no way to access the cell contents).

Alternatively just show the first X characters of each cell, and show the full cell content when the content is clicked.

Updated

a month ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.