3 ms·
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
by mettamage 7y ago
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.
- mishac 7y agoIIRC console.log was a non-standard addition made by FireBug.
- allannienhuis 7y agoSometimes 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
- thrower123 7y agoI 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.
- boothby 7y ago> 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.