-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SourceMap support to make debugging less annoying #442
Comments
Haven't had much luck with it. Sounds like a pretty recent development: |
From the original pull request to coffee-script that added support for source maps:
I think that's a more common case, so it's not quite there yet. |
@jlord have you messed with source maps at all? A big problem we have in hubot land is that stack traces from errors don't correlate to source code lines in coffeescript files (I die a little bit on the inside every time). We could feasibly compile to javascript and sourcemap more directly, but would take a bit of effort as we run everything dynamically with the |
@technicalpickles No, I haven't worked with source maps. I'm picking some brains at the meetup I'm at right now and it seems one thought I still haven't ventured into coffeescript land yet (it's looming close, I know) but I think you can't go wrong with writing small, well named functions and console.log-ing and running before compiling. That's the best I got right now :/ |
@technicalpickles Browserify will make source maps, too.
|
|
Closing this as CoffeeScript outputs both line in JavaScript and CoffeeScript.
|
@tombell since when, is it a specific coffee release? I don't think I've seen that output in practice. |
It's in whatever the latest is |
One of the most annoying things about debugging hubot .coffee scripts is the mismatch between the coffee source and the error stack traces. I came across this article talking about Mozilla adding better coffeescript via source maps, which sounds just like the thing I'm looking for
Some other things found along the way:
I think the node-source-map-support is probably the way to go, but I haven't been able to test thoroughly yet.
The text was updated successfully, but these errors were encountered: