Skip to content

Instantly share code, notes, and snippets.

@yajd
Last active August 29, 2015 13:56
Show Gist options
  • Select an option

  • Save yajd/9283387 to your computer and use it in GitHub Desktop.

Select an option

Save yajd/9283387 to your computer and use it in GitHub Desktop.
Alternative to cDump
//from ff privelage scope
Services.appShell.hiddenDOMWindow.console
//from non-priv scope just do console.log or console.ingo
//docs here: https://developer.mozilla.org/en-US/docs/Web/API/console.info
//too use its functionality:
//for typeof something do this:
//http://mxr.mozilla.org/mozilla-release/source/toolkit/devtools/webconsole/utils.js#469
//to get webconsoleutils:
//http://mxr.mozilla.org/mozilla-release/source/browser/devtools/shared/widgets/VariablesView.jsm#26
//http://mxr.mozilla.org/mozilla-release/source/browser/devtools/shared/widgets/VariablesView.jsm#35
XPCOMUtils.defineLazyModuleGetter(this, "devtools", "resource://gre/modules/devtools/Loader.jsm");
Object.defineProperty(this, "WebConsoleUtils", {
get: function() {
return devtools.require("devtools/toolkit/webconsole/utils").Utils;
},
configurable: true,
enumerable: true
});
getObjectClassName
@yajd

yajd commented Mar 1, 2014

Copy link
Copy Markdown
Author

im real sure the populate function in VariableViewer.jsm is the function that itterates through all properties safely see here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment