Javascript: Easy Javascript Debugging using Firebug Console.

Instead of using the traditional 'alert' statements for debugging, the best way to debug is using Firebug console.
What you need : Firefox browser and Firebug addon

A simple example:
INSTEAD OF :

function foo() {
 if(some condition) {
    alert("Status update");
  }
}

USE :

function foo() {
 if(some condition) {
  console.log("Status update");
 }
}

For more details : http://getfirebug.com/logging

No comments:

Post a Comment

Python contextlib for Timing Python code

If you've ever found yourself needing to measure the execution time of specific portions of your Python code, the `contextlib` module o...