Reputation: 51239
I have cookie disappearing in my webapp when it shouldn't (expring date is a year ahead).
Can I set breakpoint on cookie change or something?
Upvotes: 2
Views: 2600
Reputation: 20125
In Firebug you had the chance to stop the JavaScript execution on cookie changes. The current DevTools don't provide such a feature yet.
For Firefox it is requested in https://bugzil.la/895893, and I've just requested to add it to Chrome's DevTools in https://bugs.chromium.org/p/chromium/issues/detail?id=1171347.
What you can do right now is to search through the code within the Debugger to find the places where the cookies are changed.
To do that, you have to
document.cookie
and hit EnterAs there's currently only this way to add, remove or change cookies in JavaScript, this should allow you to find the place where the cookie you're searching is removed.
Upvotes: 5