firebug
If you're a hardcore Web Developer like me, you're probably well aware of the excellent Firefox plugin known as Firebug. Firebug's built in tools for monitoring and debugging CSS, HTML, and JavaScript/AJAX can improve development time efficiency exponentially.
如果您是像我这样的顽固的Web开发人员,那么您可能非常了解出色的Firefox插件Firebug 。 Firebug内置的用于监视和调试CSS,HTML和JavaScript / AJAX的工具可以成倍地提高开发时间效率。
As great as Firebug is, using Firebug does have its disadvantages while browsing websites that perform numerous AJAX requests. Firebug chokes on trying to analyze and display all of the information that it can make Firefox hang up. This, of course, is followed by [CONTROL] + [ALT] + [DELETE] and a restart of Firefox. Two such websites that warn users about this problem are Gmail and NetVibes.
就像Firebug一样,在浏览执行大量AJAX请求的网站时,使用Firebug确实有其缺点。 Firebug试图分析和显示可能使Firefox挂断的所有信息而感到窒息。 当然,接着是[CONTROL] + [ALT] + [DELETE],然后重新启动Firefox。 警告用户此问题的两个此类网站是Gmail和NetVibes。
If you fear that a website you are developing could cause problems for visitors with Firebug enabled, you have a few options for preventing problems.
如果您担心正在开发的网站可能会对启用Firebug的访问者造成问题,那么您可以使用几种方法来预防问题。
嗅探萤火虫并显示消息 (Sniffing Firebug and Displaying A Message)
The following JavaScript sniffs for Firebug. You could use this to display a "Please disable Firebug..." type of message.
以下JavaScript嗅探Firebug。 您可以使用它来显示“请禁用Firebug ...”类型的消息。
if (window.console && window.console.firebug) {
/* firebug found! */
}
禁用Firebug功能 (Disable Firebug Functionality)
The following JavaScript code doesn't disable Firebug but renders some problem functionality useless. The following snippet of code was taken from Yahoo! Media Player.
以下JavaScript代码不会禁用Firebug,但会使某些问题功能变得无用。 以下代码段来自Yahoo! 媒体播放器。
if (! ('console' in window) || !('firebug' in console)) {
var names = ['log', 'debug', 'info', 'warn', 'error', 'assert', 'dir', 'dirxml', 'group', 'groupEnd', 'time', 'timeEnd', 'count', 'trace', 'profile', 'profileEnd'];
window.console = {};
for (var i = 0; i < names.length; ++i) window.console[names[i]] = function() {};
}
firebug