0

Using Chrome Developer Tools one can select an HTML element and tell the debugger to break whenever this element's attributes get modified. How can I set such breakpoint for an element that gets injected into the DOM dynamically? I have an XPath query that matches this specific element, and I want the debugger to break as soon as this element's attributes are changed.

I tried this approach:

  1. Put a breakpoint just after the element is created.
  2. Configure the dev tools to break on attribute change (for the newly created element)

It works, but it is very inconvenient and I wonder if there is a better option.

BTW, I don't mind using Firefox developer tools or any other tool if it lets me do that.

Ido
  • 397
  • 2
  • 7
  • 22

0 Answers0