Question

I've been looking for a solution to use Javascript to open or activate Firebug.

You see by default, Firebug is deactivated/closed at the corner of the status bar.

You need to click the icon to activate Firebug (the icon becomes coloured).

Is there a way to activate Firebug via Javascript in the javascript code?

see following:

 // check if firebug is installed and activated
if(window.console && window.console.firebug){
   // do firebug debugging and so on
}else{
   alert('Firebug is not installed or activated.');
}
Was it helpful?

Solution

Well, if Firebug is deactivated then its not active and cannot respond to anything. You have to actually turn it on before it can accept calls from a web page.

OTHER TIPS

If you are trying to troubleshoot your own code, you can use the javascript "debugger" command to cause firebug to break on a given line of code. You will have to enable firebug debugging first for that web page. Maybe that's more along the lines of what you were looking for?

I don't think you want to trigger Firebug to open on an end user's browser; this would, at best, cause confusion for the average user.

If there is, that option could possibly be a security hazard. Basically, you're telling FF to start up the debugger. If you could tell this debugger to even do a few things more then it could be misused by hackers.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top