michaelficarra / CoffeeScriptRedux

:sweat: rewrite of the CoffeeScript compiler with proper compiler design principles and a focus on robustness and extensibility
https://michaelficarra.github.com/CoffeeScriptRedux/
BSD 3-Clause "New" or "Revised" License
1.84k stars 110 forks source link

The --nodejs options is inactive #214

Open xcambar opened 11 years ago

xcambar commented 11 years ago

Although it appears in the usage --help option, the --nodejs option that allows to pass options to the node binary does nothing. The file lib/command.js declares it, but it is not used afterwards.

This options is very helpful to start a debugging session with node.

It should be run like that:

coffee $file $opts --nodejs $node_opts

The workaround is to run coffee as follows

node $node_opts `npm bin`/coffee $file $opts

Did I do anything wrong so this options does not work ? If not, is it in the roadmap ?

BTW, are there any debugging tools for nodejs that can properly debug .coffee files instead of the compiled versions, making use of source maps ?

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/825295-the-nodejs-options-is-inactive?utm_campaign=plugin&utm_content=tracker%2F33145&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F33145&utm_medium=issues&utm_source=github).
michaelficarra commented 11 years ago

Ah, yes, I forgot to implement this. Probably related: #178. Pull requests are welcome. I can probably get to this and #178 within the next couple of weeks. It shouldn't be very hard.

jkrems commented 11 years ago

@xcambar: Shameless plug - I try to keep bugger[1] roughly up-to-date with the latest redux version. Also the new fork of node-inspector by strangeloop supports source mapped coffee-script, though they are using CS1.x for it.

[1] https://github.com/jkrems/bugger [2] https://github.com/strongloop/node-inspector

xcambar commented 11 years ago

Sounds pretty nice, I'll give it a try.

The guys at strongloop do an amazing job to keep node-inspector alive. Their fork is by far the most advanced right now.

Thanks for pointing me to bugger!