且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用Firebug调试jQuery

更新时间:2023-12-05 10:10:34

我认为提问者真的只是想知道如何在非常基本的级别上使用该工具,我想这些答案都不会直接针对他们的问题为什么他们没有得到绿色的支票.尽管您掌握了基础知识之后,其中的信息还是很有用的.这个问号很旧,原始作者可能已经赚了100万美元,但是这个答案也许会使其他人受益.我自己并不了解很多,但这就是我所知道的.

I think the asker really just wants to know how to use the tool at a very basic level, and I guess none of these answers target their issue straight on that's why they don't get green check. though the info in them is useful once you get past the basics. This Q is old and the original author has probably gone on to make a million bucks, but perhaps this answer will benefit someone else. I don't know much myself but here is what I do know.

您可以使用Firebug窗口中的脚本选项卡.查看顶部,您会看到控制台 html css 脚本 DOM 等标签.您要选择 script 标记,然后在该标记的下方(可能很小)下有另一行选项卡,第一个选项卡默认为静态,第二个选项卡是所有具有javascript的组件的下拉列表.选择要调试的一个,然后转到它的左侧,然后单击要设置断点的行旁边的空白处.那里仍然出现一个红色圆圈.现在,在右侧,有用于进入,跨步等的箭头,在监视之下的右侧,您可以看到变量经过.

You use the scripts tab from the firebug window. Look at the top you see console, html, css, script DOM etc. tabs. You want to select the script tag then below that in impossibly small type there's another row of tabs the first one defaults to static and the second one is a drop down of all the components that have javascript. Select the one you want to debug and go to the left of it and click in the margin beside the line you want to set a break point. A red circle still appears there. Now over the right there are arrows for step into, step over, etc. and to the right of that under watch you can watch variables go by.