Debugging CoffeeScript line-by-line

if you are running coffeescript from the terminal you can debug it line-for-line using node-inspector, launching your script this way:

coffee --nodejs --debug-brk yourscript.coffee

Update: there's currently a redesign of coffeescript compiler that generates source maps, which should enable you to debug your coffeescript in most recent versions of Google Chrome (18 and upwards I think).

I think it's not production-ready yet, but it's worth mentioning.


At the moment it is quite a pain to debug CoffeeScript. Most people use lots of unit tests.

There is some work being done on debugging for CoffeeScript but it is probably a while away before we'll have a really good debugger. One example is http://www.infoq.com/news/2011/08/debug-languages-on-javascript-vm