Question

I like some of what CoffeeScript offers, but the one thing that prevents me from switching is the lack of line number sync. I know this may be against common practice, but I often make JavaScript code that ends up to be over 1000 lines long, and this happens repeatedly.

Also, I often end up with errors during development. Unfortunately, the JavaScript line numbers do not at all match up with the CoffeeScript. This means I have to debug in JavaScript, just to bring the fixes back into CoffeeScript, which I imagine can become a little difficult as the file grows.

Can I synchronize the line numbers somehow?

Was it helpful?

Solution

No, but it is being worked on. I guess it is a problem for anything using the Google Closure tools (like ClojureScript does; at least for aggressive optimization I guess), since it has rather aggressive rewriting of the code and variable renaming. But for other langauges (like CoffeeScript) it's not a big problem, as functions and variables keep their name in their javascript output, and the generated code is easy to read and comprehend.

OTHER TIPS

As Marius said, this is not possible for the moment. But browsers vendors are thinking/working on a way to move CoffeScript support/execution to browsers, so you won't have to work with Javascript anymore.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top