allow console.table to group elements

RESOLVED WONTFIX

Status

()

Firefox
Developer Tools: Console
RESOLVED WONTFIX
3 years ago
2 years ago

People

(Reporter: \, Unassigned)

Tracking

31 Branch
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Sorry, the original summary is probably not very expressive.

One thing I'd like to be able to do when debugging my WebGL code is to be able to use console.table to print the values of my typed arrays.  It is quite common to have interleaved values, for example a typed array like:

[r0, g0, b0, a0, pointSize0, u0, v0, r1, g1, b1, ...]

where values that will later be assigned to various attributes in my vertex shader are interleaved.

Part of the issue is that I can't print an Array View or Array Buffer with console.table, which I should file as a separate issue.

What I'm really after, is say I've interleaved my data in a regular JavaScript Array.  I'd like to be able to provide a stride and offset (and maybe labels) that way I can pass a single array to console.table and get a print out like:

_|r  |g  |b  |a  |pointSize|u  |v
0|1.0|0.0|0.0|1.0|10       |0.0|0.0
0|1.0|1.0|0.0|1.0|10       |0.0|1.0
0|1.0|0.0|1.0|1.0|10       |1.0|1.0
0|1.0|1.0|0.0|1.0|10       |1.0|0.0

Of course, this can be done with some JavaScript clientside, but currently, printing an array just prints a long vertical list of all of the elements, which makes it hard to eyeball values.
Clearing out some of the inactive feature requests, so I'm going to close this one out.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.