
While they are often incomplete due to evented execution, Node.JS stacktraces are an invaluable tool for debugging your app. However, thanks to the plethora of Node.JS libraries, they often point to files outside of your project, making inspection a bit tedious. Also, would it not be nice to just jump to the correct source location in your editor by clicking on a stack frame?
If you use TextMate, you might profit from this one-liner: Simply save the gist as an executable on your path (or add the sed call as an alias) and pipe your Node/Expresso invocations through it like this:
cat stack through sed:
> expresso my/test.js 2>&1 | node-trace-txmt.sh
On Mac OS X, you can now open a frame source in Textmate by cmd-shift-doubleclick or using the context menu (alternative terminals such as iTerm / iTerm2 supposedly make this even easier).
Obviously similar expressions will do the same thing for your Django/Rails/COBOL app. Different text editors are also easy to support — if they provide an URL handler. Here is the version for Mac Vim. If you do not use an editor that supports a URL scheme, you can still use generic file:// URLs (gist), which works on non-mac systems as well.