简体   繁体   中英

How to set event listener breakpoints in Chrome's Elements tab?

I am struggling with setting breakpoints in dynamically generated DOM elements, where different event handlers are also binded from Javascript. This basically means that I have a nice looking DOM structure which is not part of the initially received HTTP response, it is purely built on client side.

Now the problem is that Chrome's Elements tab only allows me to set breakpoints for

  • Subtree modification OR
  • Attribute modification OR
  • Node removal

Is it possible to set a breakpoint in the dynamically created DOM element's dynamically created event listener somehow? (See image attached. I want to set the breakpoint into the listenerbody)

在此输入图像描述

Note that I can't use 'Sources/Scripts' tab either, since it only shows me the initially received static HTTP content response. And I can't set breakpoint either in the code referenced in the 'Event Listeners' accordion, since it will only show me the event listener when it is getting attached not when it is getting fired!

Any ideas?

源 - >事件侦听器断点包含一组复选框,可以在触发事件的事件侦听器时检查该复选框以激活断点。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM