I use following codes and tools to debug files of CoffeeScript/JavaScript:
if myVariable? # this statement can check whether this variable has its value(s), null or undefined. If it has value, this statement would return true, otherwise false.
alert JSON.stringify(myVariable,null,4) # to show this object's attributes and values of its attributes
else
alert "null or undefined."
if myVariable_2?.length # this statement can check whether this variable has its value(s), empty string, null or undefined. If it has value(s) or is an empty string, this statement would return true, otherwise false.
alert JSON.stringify(myVariable_2,null,4)
else
alert "null or undefined'