This repository has been archived by the owner. It is now read-only.

Support SourceMap #3712

Closed
gfx opened this Issue Jul 15, 2012 · 24 comments

Comments

Projects
None yet
@gfx

gfx commented Jul 15, 2012

There comes more and more JavaScript source generation tools.
If nodejs support SourceMap, we'll be very happy. On Browsers, Chrome (19+) supports SourceMap and it works well.
(cf. INTRODUCTION TO JAVASCRIPT SOURCE MAPS)

(This ticket might be related to #2537)

@bnoordhuis

This comment has been minimized.

Show comment
Hide comment
@bnoordhuis

bnoordhuis Jul 15, 2012

Member

What's stopping you from writing a sourcemap module and publishing it on npm? I don't think there's anything in the sourcemap spec that requires it to be the a core module but please correct me if I'm wrong.

Member

bnoordhuis commented Jul 15, 2012

What's stopping you from writing a sourcemap module and publishing it on npm? I don't think there's anything in the sourcemap spec that requires it to be the a core module but please correct me if I'm wrong.

@bnoordhuis bnoordhuis closed this Jul 15, 2012

@gfx

This comment has been minimized.

Show comment
Hide comment
@gfx

gfx Jul 18, 2012

I'm sorry to my lack of explanations. I didn't mean to need sourcemap modules. There is already a stable sourcemap module: https://github.com/mozilla/source-map

Rather, I'd like to node to understand source-mapping information. How can we see correct line numbers and file names in runtime error messages when we use CoffeeScript? That's sourcemap and it is the interpreter which can process source-mapping files.

gfx commented Jul 18, 2012

I'm sorry to my lack of explanations. I didn't mean to need sourcemap modules. There is already a stable sourcemap module: https://github.com/mozilla/source-map

Rather, I'd like to node to understand source-mapping information. How can we see correct line numbers and file names in runtime error messages when we use CoffeeScript? That's sourcemap and it is the interpreter which can process source-mapping files.

@bnoordhuis

This comment has been minimized.

Show comment
Hide comment
@bnoordhuis

bnoordhuis Jul 18, 2012

Member

Why would node need to do anything? Isn't that the task of the CS loader?

Member

bnoordhuis commented Jul 18, 2012

Why would node need to do anything? Isn't that the task of the CS loader?

@gfx

This comment has been minimized.

Show comment
Hide comment
@gfx

gfx Jul 18, 2012

CoffeeScript is just an example and I doesn't use CS actually, sorry.

What I use is Google Closure Compiler and JSX, which are also support sourcemap output.

gfx commented Jul 18, 2012

CoffeeScript is just an example and I doesn't use CS actually, sorry.

What I use is Google Closure Compiler and JSX, which are also support sourcemap output.

@bnoordhuis

This comment has been minimized.

Show comment
Hide comment
@bnoordhuis

bnoordhuis Jul 18, 2012

Member

Okay, thanks - that kind of clears it up for me. I doubt anyone on the core team has the time or the inclination to work on this but we'll entertain patches. I'll reopen the issue.

Member

bnoordhuis commented Jul 18, 2012

Okay, thanks - that kind of clears it up for me. I doubt anyone on the core team has the time or the inclination to work on this but we'll entertain patches. I'll reopen the issue.

@bnoordhuis bnoordhuis reopened this Jul 18, 2012

@gfx

This comment has been minimized.

Show comment
Hide comment
@gfx

gfx Jul 18, 2012

Thank you very much! Anyway, it is the first step.

gfx commented Jul 18, 2012

Thank you very much! Anyway, it is the first step.

@martinheidegger

This comment has been minimized.

Show comment
Hide comment
@martinheidegger

martinheidegger Dec 14, 2012

Right now having no correct file number of stacktraces from code created by the is annoying at best. I would very much welcome this feature: +1

martinheidegger commented Dec 14, 2012

Right now having no correct file number of stacktraces from code created by the is annoying at best. I would very much welcome this feature: +1

@eldargab

This comment has been minimized.

Show comment
Hide comment
@eldargab

eldargab commented Dec 18, 2012

+1

@Lewuathe

This comment has been minimized.

Show comment
Hide comment
@Lewuathe

Lewuathe Dec 19, 2012

We'll be able to get more debug options on node development +1

Lewuathe commented Dec 19, 2012

We'll be able to get more debug options on node development +1

@SystemParadox

This comment has been minimized.

Show comment
Hide comment
@SystemParadox

SystemParadox Jan 7, 2013

+1, I've even made my own language that extends JavaScript, that's how common this is becoming

SystemParadox commented Jan 7, 2013

+1, I've even made my own language that extends JavaScript, that's how common this is becoming

@devongovett

This comment has been minimized.

Show comment
Hide comment
@devongovett

devongovett Feb 8, 2013

Here is a module that implements sourcemap support in user land https://github.com/evanw/node-source-map-support

devongovett commented Feb 8, 2013

Here is a module that implements sourcemap support in user land https://github.com/evanw/node-source-map-support

@jashkenas

This comment has been minimized.

Show comment
Hide comment
@jashkenas

jashkenas Mar 9, 2013

FWIW, it looks like @evanw's implementation is fairly minimal, and would probably be a good starting point for getting a patch landed into core: https://github.com/evanw/node-source-map-support/blob/master/source-map-support.js

... this would also help for development in terms of bringing the Node debugger closer to browser debuggers in terms of feature parity -- making it a bit more viable to develop and test libraries in just Node instead of in Chrome.

jashkenas commented Mar 9, 2013

FWIW, it looks like @evanw's implementation is fairly minimal, and would probably be a good starting point for getting a patch landed into core: https://github.com/evanw/node-source-map-support/blob/master/source-map-support.js

... this would also help for development in terms of bringing the Node debugger closer to browser debuggers in terms of feature parity -- making it a bit more viable to develop and test libraries in just Node instead of in Chrome.

@TooTallNate

This comment has been minimized.

Show comment
Hide comment
@TooTallNate

TooTallNate Mar 9, 2013

Because of the hacky way that this needs to be integrated into the V8 internal API, it seems to me that this belongs at the V8 level rather than node...

TooTallNate commented Mar 9, 2013

Because of the hacky way that this needs to be integrated into the V8 internal API, it seems to me that this belongs at the V8 level rather than node...

@gfx

This comment has been minimized.

Show comment
Hide comment
@gfx

gfx Jun 15, 2013

There's an npm to support source-map: https://github.com/evanw/node-source-map-support

I'd like to merge node-source-map-support into the NodeJS core.

gfx commented Jun 15, 2013

There's an npm to support source-map: https://github.com/evanw/node-source-map-support

I'd like to merge node-source-map-support into the NodeJS core.

@fresheneesz

This comment has been minimized.

Show comment
Hide comment
@fresheneesz

fresheneesz Jun 29, 2013

It doesn't seem like evanw's node-source-map-support gives any real support for debugging. Is this issue about stack traces and debugging, or just the former?

fresheneesz commented Jun 29, 2013

It doesn't seem like evanw's node-source-map-support gives any real support for debugging. Is this issue about stack traces and debugging, or just the former?

@gfx

This comment has been minimized.

Show comment
Hide comment
@gfx

gfx Jun 29, 2013

@fresheneesz Ideally, yes, but partial support is better than nothing.

gfx commented Jun 29, 2013

@fresheneesz Ideally, yes, but partial support is better than nothing.

@realyze

This comment has been minimized.

Show comment
Hide comment
@realyze

realyze commented Sep 10, 2013

+1 this

@doublerebel

This comment has been minimized.

Show comment
Hide comment
@doublerebel

doublerebel commented Sep 15, 2013

👍

@jnordberg

This comment has been minimized.

Show comment
Hide comment
@jnordberg

jnordberg commented Mar 22, 2014

👍

@kenjiru

This comment has been minimized.

Show comment
Hide comment
@kenjiru

kenjiru Apr 14, 2014

Sourcemaps support would be really nice for debugging TypeScript modules. Thanks!

kenjiru commented Apr 14, 2014

Sourcemaps support would be really nice for debugging TypeScript modules. Thanks!

@patrickmesana

This comment has been minimized.

Show comment
Hide comment
@patrickmesana

patrickmesana commented Oct 3, 2014

+1

@misterdai

This comment has been minimized.

Show comment
Hide comment
@misterdai

misterdai Nov 6, 2014

👍 Would love sourcemap support. Currently using Traceur to transpile ES6/7 for Node, which can produce the sourcemap files but I can't make use of them.

misterdai commented Nov 6, 2014

👍 Would love sourcemap support. Currently using Traceur to transpile ES6/7 for Node, which can produce the sourcemap files but I can't make use of them.

@gsikorski

This comment has been minimized.

Show comment
Hide comment
@gsikorski

gsikorski Feb 2, 2016

+1 For production server it is nice to browserify + minify the code of the backend as well (even including all node_modules installation), so that it occupies less space. Would be great if node supports printing the stack using provided source map.

gsikorski commented Feb 2, 2016

+1 For production server it is nice to browserify + minify the code of the backend as well (even including all node_modules installation), so that it occupies less space. Would be great if node supports printing the stack using provided source map.

@bnoordhuis

This comment has been minimized.

Show comment
Hide comment
@bnoordhuis

bnoordhuis Apr 29, 2016

Member

Closing, continues in nodejs/node#6471.

Member

bnoordhuis commented Apr 29, 2016

Closing, continues in nodejs/node#6471.

@bnoordhuis bnoordhuis closed this Apr 29, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.