Is it possible to break javascript execution in browser developer tools always when a cookie is set (without setting JS breakpoints explicitly)?
document.cookie = '...';
This should work (run it in a console):
origDescriptor = Object.getOwnPropertyDescriptor(Document.prototype, 'cookie');
Object.defineProperty(document, 'cookie', {
get() {
return origDescriptor.get.call(this);
},
set(value) {
debugger;
return origDescriptor.set.call(this, value);
},
enumerable: true,
configurable: true
});