debugging javascript:
function f() {
...
while (many iterations) {
let x = ...
.....
... something thriws here because of x....
}
...
}
now becomes:
function f() {
try {
...
while ....
var x = ...
...
...
}
catch (e) {
console.error(x);
throw e;
}
}
every odd feature counts :)