How to break on localStorage changes
问题 I'm looking for a way to break on any localStorage changes. I have found that there are some mysterious entries that I have no idea where that is coming from and I would like the debugger to break on any changes so that I can inspect the code. This includes: localStorage.someKey = someValue; localStorage["someKey"] = someValue; localStorage.setItem("someKey", someValue); Since there are so many ways to alter/create an entry in localStorage, simply overriding .setItem and do debugger; will not