两种比较好用的js调试器----Firebug and Firebug Lite

1: Firebug, an open source debugging extension for Firefox, is essential for JavaScript, HTML and CSS debugging. You can download it from the Firebug web site.
2:If you use Internet Explorer or Safari, you can use the Firebug Lite library
在DOJO中引用的方法
To use Firebug Lite, you must include the isDebug config parameter like so:

<script type="text/javascript" src="http://o.aolcdn.com/dojo/1.0.0//dojo/dojo.js" 
djConfig="parseOnLoad: true, isDebug: true"></script>

This parameter has no effect on Firefox browsers with Firebug already present. So including this parameter makes your debugging code usable in IE, Safari, and Firefox with no changes.
在其他的程序中引用的方法
安装Firebug Lite
下载Firebug并解压到你的网站任何目录,插入下面一行代码到你需要包含firebug的页面:

<script type="text/javascript" src="/path/to/firebug/firebug.js"></script>

如果你不想在其他非firefox浏览器中模拟firebug,而仅仅只是为了防止console.log()函数在你的页面中报错,那你只需要包含下面的文件就行了:

<script type="text/javascript" src="/path/to/firebug/firebugx.js"></script>
注:firebugx.js只有1K,而firebug.js有16K,能够节约页面的加载时间。


使用Firebug Lite
Firebug Lite不会强制显示在网页上,除非你手动显示它。在浏览器中按F12,一个类似Firefox中的Firebug控制台会出现在网页的底部,再次按下F12,控制台又会隐藏。你是否觉得每次页面加载后按F12麻烦呢?Firebug Lite想你所想,它提供了一个便利的解决方法:你只需要在网页的<html>标签上加上属性debug="true":

<html debug="true">
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值