最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Use Javascript to openactivate Firebug - Stack Overflow

programmeradmin2浏览0评论

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 bees 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.');
}

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 bees 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.');
}
Share Improve this question asked Sep 12, 2009 at 9:04 maurismauris 43.6k16 gold badges101 silver badges132 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 4

If you are trying to troubleshoot your own code, you can use the javascript "debugger" mand 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.

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.

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.

发布评论

评论列表(0)

  1. 暂无评论