3 ms·
> In a reasonable language, you do something obviously wrong, and it throws an exception immediately, which gives you a stack trace that gives reasonable contex
by Can_Not 9y ago
> In a reasonable language, you do something obviously wrong, and it throws an exception immediately, which gives you a stack trace that gives reasonable context for understanding what went wrong.
So how is it even possible that this tool works if JavaScript doesn't do this? I don't know why you're just making things up.
- kerkeslager 9y agoThe tool allows replays of state, which allows you to reverse execution back to the point where the error occurred. If you think JavaScript throws errors immediately when you do something obviously wrong, try evaluating the following expressions in your console: {}.foo "foo" + 1 undefined + 1 None of these return any sort of error until much later when you get an exception like "Undefined has no properties", or worse, no exception at all just "foo1" or "NaN" printing in a place you expected an actual number. Good luck trying to debug any of these situations if the result gets passed to a callback and the actual exception finally occurs inside a promise inside a callback.
- deleted 9y ago[deleted]