问题
Is there a way to set a conditional breakpoint based on a value in a Javascript Closure in a browser? There's an html element node in the closure whose 'name' property value changes for every AngularJS $formatters action execution. I would like a breakpoint to get hit only for a certain element.
The code snippet is in AngularJS attribute directive. The breakpoint is on the originalValue line.
This screen capture shows the Closure in the Call Stack in Chrome Dev Tools. There's a property 'name' (not shown) which has the element's name.
I am looking for a breakpoint expression like this (Obviously not correct) : Closure (link).element.0.name == 'customerName'
来源:https://stackoverflow.com/questions/50731565/is-there-a-way-to-set-a-conditional-breakpoint-based-on-a-value-in-a-javascript