In OpenLayers/Console.js detection of firebug isn't right.
After loading a page if 'console' or expression '4+4' written in FBug console I'll
get error:
context.consoleHandler is undefined
chrome://firebug/content/commandLine.js
Line 78
FF 3.0, Firebug from svn firebug-1.2XJ.0b3
Code:
var consoleHandler;
for (var i=0; i<context.consoleHandler.length; i++) // here is the problem line
{
if (context.consoleHandler[i].window == win)
{
consoleHandler = context.consoleHandler[i].handler;
break;
}
}
As a solution I added a return into Console.js:
(function() {
/**
* If Firebug Lite is included (before this script), re-route all
* OpenLayers.Console calls to the console object.
*/
return;
if(window.console) {
var scripts = document.getElementsByTagName("script");
for(var i=0; i<scripts.length; ++i) {
if(scripts[i].src.indexOf("firebug.js") != -1) {
OpenLayers.Util.extend(OpenLayers.Console, console);
break;
}
}
}
})();
Now all works fine.