Omg the cookie is being changed, but where? Give me a breakpoint when JS changes my cookies!
breakOn(document, 'cookie');
Some JS is getting the
scrollTop
value causing massive Recalculate Styles costs.. Who is theperpetratorPERFetrator?
breakOn(document.body,'scrollTop', 'read')
This works really well as a snippet in the Chrome DevTools:
![](http://i.imgur.com/snA9unr.png)By default, breakOn will only break when JS attempts to change the value of a property. The third optional argument takes 'read' if you'd also like to break when values are read.
- @fat blogged "debugging javascript" with an idea (attributed to @mracus) I'd talked about but hadn't seen yet
Object.defineProperty(twttr, 'profile', {
get: function () {
debugger
}
, set: function (val) {
debugger
}
})
- I asked for help generalizing it and saving the initial value
- Dave Methvin answered the call
- 18 months later I forked it, made this repo, and tried to ship it finally.