I need to debug a web application that uses jQuery to do some fairly complex and messy DOM manipulation.(我需要调试一个使用jQuery进行一些相当复杂和混乱的DOM操作的Web应用程序。)
At one point, some of the events that were bound to particular elements, are not fired and simply stop working.(某一时刻,某些与特定元素绑定的事件并未触发,只是停止工作。)
If I had a capability to edit the application source, I would drill down and add a bunch of Firebug console.log()
statements and comment/uncomment pieces of code to try to pinpoint the problem.(如果我有能力编辑应用程序源代码,那么我将向下钻取并添加一堆Firebug console.log()
语句和注释/取消注释代码段以尝试找出问题所在。)
But let's assume I cannot edit the application code and need to work entirely in Firefox using Firebug or similar tools.(但是,假设我无法编辑应用程序代码,并且需要使用Firebug或类似工具完全在Firefox中工作。)
Firebug is very good at letting me navigate and manipulate the DOM.(Firebug非常擅长让我浏览和操作DOM。)
So far, though, I have not been able to figure out how to do event debugging with Firebug.(不过,到目前为止,我还无法弄清楚如何使用Firebug进行事件调试。) Specifically, I just want to see a list of event handlers bound to a particular element at a given time (using Firebug JavaScript breakpoints to trace the changes).(具体来说,我只想查看在给定时间绑定到特定元素的事件处理程序的列表(使用Firebug JavaScript断点来跟踪更改)。) But either Firebug does not have the capability to see bound events, or I'm too dumb to find it.(但是Firebug无法查看绑定事件,或者我太笨了,找不到它。) :-)(:-))
Any recommendations or ideas?(有什么建议或想法吗?)
Ideally, I would just like to see and edit events bound to elements, similarly to how I can edit DOM today.(理想情况下,我只想查看和编辑绑定到元素的事件,就像今天编辑DOM一样。)
ask by Jaanus translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…