4 ms·
The reason this doesn't work in the same way is because it requires you to know where the error occurs. You tend to operate on a data structure and know that a
by Normal_gaussian 7y ago
The reason this doesn't work in the same way is because it requires you to know where the error occurs.
You tend to operate on a data structure and know that at some point x becomes y. By placing a watch on x you find out where that point is.
Editing the code does not get you this (bar modern proxies in js).
- plausibilities 7y agoif(x) { debugger }
- Normal_gaussian 7y agoPlay with conditional watchpoints in gdb to understand why this does not make sense as a reply to the comment explaining why this is not a substitute.
- z3t4 7y agoAha. I sometimes use ES5 defineProperty where you can define get and set functions. I built an ORM using defineProperty. Where changing a value triggers an database update. But the best way is to avoid globals or only update it at one place.