As a tip i really recommend:
Know better the Console API
Maybe you are very close with
console.log(), but consider to explore more the Console API.
You can take more control with
console.error(). And get a better visualization with
To learn more about this API, take a look at https://getfirebug.com/wiki/index.php/Console_API
Debug with brakepoints
After some time, you will see you cant manage a lot of
console.log(). Start using the Sources tab at Chrome Developers Tools or the Script tab at Firebug. Put breakpoints, go ahead, take a step back, change the value of a variable and more.
If you use other techniques share with us.