문제

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?

도움이 되었습니까?

해결책

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.

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top