-
Notifications
You must be signed in to change notification settings - Fork 56
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
Generate source maps when running file directly too #184
Comments
related to this, it would be great to be able to generate source maps not just when running via _node or _coffee, but also when using the register() api path. |
Indeed! That's actually my/our use case too. ( |
From jashkenas/coffeescript#3187 (comment), a quick workaround for this for https://gist.github.com/benjie/9387284 No reason this workaround couldn't be used |
It was originally supposed to be the case that you would get source-mapped stack traces when running with However, this only stores the source maps in memory, so it won't work with |
Cool! Would this work with the Tricky situation with the source vs. compiled files. One hacky idea that comes to mind is to create a copy of the source file somewhere temporary, for the purposes of the source map pointing to it. But then I imagine in node-inspector it'd look like your source files were in some temporary folder, which is no good either. Dang... |
It should work with the |
@goffrie: you're right for https://github.com/Sage/streamlinejs/blob/v0.10.8/lib/compiler/command.js#L8 Should that default be changed? Not sure. (cc @bjouhier) |
I just realized: if stack traces take advantage of source maps, why can't they use the "original" filename from the source maps, just like node-inspector? If they could, would there by any other downside to changing |
To clarify, I imagine this means that when we run or require |
Extracting this request out of issue #166 as... requested. (Pun intended.) 🎤
I'd love to be able to run Streamline code directly, and still get source map support (e.g. for use with node-inspector).
This could be achieved by either generating the source maps in a temporary directory (instead of alongside the source files), or if it's possible, in memory directly.
(I didn't even know the latter could be a possibility until it was mentioned in a similar issue for CoffeeScript: jashkenas/coffeescript#3187 (comment) Does the source map comment format support embedding the source map directly maybe?)
/cc @goffrie — I would be grateful for your continued expertise on this matter. Thank you!
The text was updated successfully, but these errors were encountered: