Closed Bug 586249 Opened 14 years ago Closed 14 years ago

Format objects printed to WebConsole output

Categories

(DevTools :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 598357

People

(Reporter: julian.viereck, Assigned: pcwalton)

References

Details

Attachments

(1 file, 1 obsolete file)

Currently when an object is printed to the WebConsole output it looks like [object Object] due to the fact that the .toString() method is uses. Also, arrays don't look like arrays, strings don't look like strings and functions use the toString() method instead of the toSource() method.

Let's make objects look like "Object {...}", strings like '"foo"', arrays like "[ 1, 2, 3]" and functions use the toSource() function.

Assign to me as I've got a (unrebased) patch for this in my mq.
Whiteboard: [kd4b5]
Julian: please attach whatever patch you have to this bug and someone else can pick it up in the coming weeks. Thanks!
Whiteboard: [kd4b5] → [kd4b6]
Attached patch Patch v1 (obsolete) — Splinter Review
Adds some new functions to the JSTerm object to print objects to the output more "formated".
Attachment #470740 - Flags: feedback?(ddahl)
Attached patch Patch v1.1Splinter Review
New patch that fixed the RegExp used to get the object name to work with debug builds as well. Fixed this in the PropertyPanel.jsm as well.
Attachment #470740 - Attachment is obsolete: true
Attachment #470757 - Flags: feedback?(ddahl)
Attachment #470740 - Flags: feedback?(ddahl)
Depends on bug 583476 (WebConsole fails to activate when window.console is already defined). This bug is necessary as otherwise the jsterm object on the hud object is undefined after page reload.
Blocks: 529086
Depends on: 583476
OS: Mac OS X → All
Hardware: x86 → All
Assignee: julian.viereck → pwalton
Whiteboard: [kd4b6]
bug 598357 is taking care of a bunch of formatting issues with console output.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
Attachment #470757 - Flags: feedback?(ddahl)
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: