Snippets code from my daily experience

August 19, 2008

Error console in Komodo

Filed under: komodo,nsIConsoleService — dafi @ 3:25 pm

I’ve need to migrate to Komodo a bunch of Firefox extension code logging using nsIConsoleService.

The output goes to error console but Komodo doesn’t directly allow to open it, you can manually execute the code shown below as a macro.

window.openDialog(‘chrome://global/content/console.xul’, ‘_blank’);

Any time the code is executed a new error console window is open, if you don’t like this behaviour past the macro shown below

function toOpenWindowByType(inType, uri, features)
var windowManager = Components.classes[‘;1’].getService();
var windowManagerInterface = windowManager.QueryInterface(Components.interfaces.nsIWindowMediator);
var topWindow = windowManagerInterface.getMostRecentWindow(inType);

if (topWindow)
else if (features), “_blank”, features);
else, “_blank”, “chrome,extrachrome,menubar,resizable,scrollbars,status,toolbar”);

toOpenWindowByType(“global:console”, “chrome://global/content/console.xul”)


Blog at

%d bloggers like this: