Closed
Bug 879019
Opened 13 years ago
Closed 13 years ago
console.log from Jetpack prints string [Object object]
Categories
(DevTools :: Console, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 850296
People
(Reporter: canuckistani, Unassigned)
Details
Attachments
(1 file)
|
216.17 KB,
image/png
|
Details |
This might be an SDK bug - the output from the SDK's console.log to the browser Console does not inspect objects correctly, probably because the output from the SDK's console is stringified with a prefix containing the name of the extension:
scratch-kit: [object Object]
Test code ( run in Gozala's scratch-kit extension [1] ):
// Jetpack scratchpad
var { Cu } = require("chrome");
var c = Cu.import("resource://gre/modules/devtools/Console.jsm").console;
console.log(o);
c.log(o);
[1] https://github.com/Gozala/scratch-kit/
Comment 1•13 years ago
|
||
I remember Alex told me that the console object implementation in addon-sdk stringifies all the arguments, hence the problem you see.
Alex, should this bug move to the addon-sdk component?
Comment 2•13 years ago
|
||
You're right. All messages are piped to the console here and stringified:
https://github.com/mozilla/addon-sdk/blob/master/lib/sdk/system/globals.js#L29-L37
This bug will be fixed when we will really integrate SDK with the devtool console and plug our console directly to Console.jsm.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
Updated•8 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•