Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Javascript debuggers did not exist for most of the 2000s. It was a godsend when Mozilla provided the Error Console to let developers know when an error had occurred in Javascript (in a nicer way than getting an alert for each error), but developers still needed print statements because code that worked in Firefox and Opera would break in Internet Explorer. When the first Javascript debuggers came out, they were difficult to use and slow enough to do more damage to productivity than they helped. Experienced developers might be continuing with their old work patterns or may not be aware that better tools exist now. Safari has a good Javascript debugger and I use it.

On the server side, print and vardump statements will provide the developer the desired information in a one-second refresh of the browser. A debugger will need to be run on an independent server instance which can take time to configure and start up. If the development environment is not already set up for this, running a debugger can take longer than identifying and fixing the bug using print statements.



The javascript console on -webkit (Chrome)is a godsend for me, because if you have a JQuery bug, nothing at all works, so instead of being able to do one large update you have to do it in small ones, or spend ages debugging.

Of course, you could just write correct code, but no one is perfect and mistakes do happen. Would be better if the errors it found were displayed in a more clear form of english instead of generic error names, but it is better than looking over line after line trying to find that darn missing semi-colon.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: