
JavaScript Errors: An Exceptional History - Liriel
https://blog.appsignal.com/2019/10/17/javascript-errors-an-exceptional-history.html
======
z3t4
I remember that in IE all you got was a yellow alert sign in the status bar
that there was a JavaScript error _somewhere_ and you added alert boxes on
every 100:ed line eg. alert("line 200") alert("line 220") until you had
located the error. This is still how you do it on some mobile/tv browsers.
Some browsers will not even tell you there is an error - and fail silently.

~~~
mettamage
Wait, so when did console.log start to appear?

I remember alert without console.log as well but I was too young to understand
the context.

For ios mobile dev I use Safari as a debugger. If I have to use Chrome, I
basically use a scrappy console that I made on the HTML page itself.

~~~
allannienhuis
Sometimes dumping data to a pre tag is the simplest thing, especially on
mobile. I did it just yesterday :)

Be careful about using JSON.stringify on objects as a debugging technique
though, because you may not be able to see properties on the prototype chain
('inherited' properties), and some objects customize their serialization to
JSON (supply a custom toJSON method) which in some cases can be misleading.
Things like that have contributed to a number of my grey hairs. Yes, I'm
talking about you, Geolocation Coordinates! :)

Chrome has really nice support for remote debugging on Android.

If you can't get physical access to the device to configure them for remote
debugging, there are some other nice remote debugging tools. One example:
[https://jsconsole.com/remote-debugging.html](https://jsconsole.com/remote-
debugging.html)

------
dlbucci
I had no idea JavaScript shipped without Arrays. Too bad they didn't just let
objects take anything as a key, like in Lua. Then you wouldn't have all the
edge cases Arrays cause in JS. Oh well!

~~~
rodinia
This (anything can be a key) was eventually added with the Map class. They're
an iterable type too, so they're much more useful than Objects imo.

[https://developer.mozilla.org/en-
US/docs/Web/JavaScript/Refe...](https://developer.mozilla.org/en-
US/docs/Web/JavaScript/Reference/Global_Objects/Map)

~~~
dlbucci
I agree! They are more useful! That's why I wish objects behaved that way to
begin with!

