makes debugging coffee-script easier by displaying corresponding lines of code in the stack-trace with style
Coffee-Trace makes debugging coffeescript code easier by attempting to point corresponding coffeescript code and line numbers and styling the stacktrace a little bit.
Running this..
require('coffee-trace')
test = ->
people =
john:
first_name: 'john'
last_name: 'doe'
mary:
first_name: 'mary'
last_name: 'jane'
console.log("Welcome", people[p].first_name, people[p].last_name, "!!!") for p in ['john', 'mary', 'josh']
process.nextTick test
If you love Coffee-Script and Node.js, you will provably also be frustrated by the challenges of quickly finding and debugging the coffeescript line corresponding to the one pointed out by the stack-trace.
I've been searching a cleaner solution myself, and have found some very useful links and discussions, but am yet unsatisfied. So, while SourceMaps implementation in Coffee-Script is a reality, this is the least I can do.
Become a masochist by enjoying uncaughtExceptions
and crashes. Just by installing with:
npm install coffee-trace
and at the very beginning of your code:
require('coffee-trace')
- Testing ( make something crash the way expected )
- Beautify and comment code