News for hackers. Stuff that matters.
Re:JavaScript Errors: An Exceptional History by mettamage on Tuesday November 05, 2019 @11:31AM (#21453884)
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.

Re:JavaScript Errors: An Exceptional History by allannienhuis on Tuesday November 05, 2019 @11:50AM (#21454102)
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

Re:JavaScript Errors: An Exceptional History by mishac on Tuesday November 05, 2019 @11:47AM (#21454059)
IIRC console.log was a non-standard addition made by FireBug.
Re:JavaScript Errors: An Exceptional History by boothby on Tuesday November 05, 2019 @01:09PM (#21454937)
> If I have to use Chrome, I basically use a scrappy console that I made on the HTML page itself.

Back in the day when I was working on the Sage Notebook, there weren't good javascript consoles. I can't recall if Firefox had one at the time (around 2007, I think), but it was certainly missing from Safari, IE, and Opera. But, it was an interactive notebook -- so I hijacked the "input cell" we were using to concoct what was essentially a console.

Re:JavaScript Errors: An Exceptional History by thrower123 on Tuesday November 05, 2019 @12:49PM (#21454696)
I can remember when console.log would break certain versions of IE... I believe even in IE8, console.log would only work if you had the developer JS console opened up, unless you polyfilled it.

Thank god I don't have to support IE anymore, what a mess it was.