Write human readable debug info!

It’s a common begginer’s developer mistake to write some fullish debug info like “i’m in the IF”, or even worse – “test”. Of course when debugging you don’t get any aditional information. You know only that – you’re in the IF statement!? What a good news! That doesn’t tell you much, isn’t it?

Another bad way to debug is to dump only ids from some database table or loop index. At least write something before that, something like:

alert('on the: ' + index + ' happened something!');

that gives you more and can improve your work so much.

Related posts:

  1. write in the Safari javascript console
  2. jQuery debug plugin
  3. debug JavaScript on IE6
This entry was posted in web development and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">