Search code examples
google-chrome-devtoolsdeveloper-toolsfirefox-developer-tools

Break if element of an object in watch has specific value


I have added a element to my watchlist. Is it possible to set a breakpoint if the value of a element matches a specific value?

enter image description here

E.g. it should stop as soons as the value of the element className is mceEditor. At the moment I have to manually go to this position step by step by step...

Is this possible? Are there any developer tools which are capable of this?


Solution

  • I figured out that there are conditional breakpoints. I added one at the correct spot and now it is just like I desired.

    elm.className == 'mceEditor'

    Chrome: Open the developer tools and open the tab "sources". then right click on the line number and select "Add conditional breakpoint" and set your condition.