What's with the insta-downvotes whenever someone mentions Coffeescript's debugging issues? I am not an active Coffeescript developer, but I thought that debugging line-by-line was prohibitively difficult, especially in the browser. Has this changed? If not, why the animosity?
I'd say this "difficult-to-debug" attitude comes from those who did not actually tried to work with CoffeeScript and just think that would be the case.
We have a lot of code in it already and debugging was never an issue.
I don't the fact that CoffeeScript can't be debugged until browsers support it. JavaScript errors are bad enough, but until I can get a CoffeeScript source line number in an error I simply refuse.
Well, he actually said "debugging code when it is running," which a lot of people find valuable. Of course you can debug anything in the looser sense of the term, but tools like debuggers make the process more productive.
And yes, many people are against Coffeescript too for precisely this reason.
Not me so much as others - it's a very common problem I've seen when debugging other people's CoffeeScript code. CoffeeScript is a bit of a different situation than other languages since with other languages, it's the norm (i.e. Ruby) - however, with JavaScript, it is not something inherent in JS, so when people jump from JS to CoffeeScript, there is a disconnect.
If you can't debug in CoffeeScript, you can't take it seriously. Even meta-CSS frameworks suffer from this problem when there's errors you have to back-track through a whole layer.
I also think that lack of line-number mappings is a fair criticism of coffeescript. If the article is rejecting FUD, then it should target statements like "debugging is a nightmare." I agree with the author's overall point that you can usually track down problems without a lot of fuss.
Am I really that much of an outlier in loving coffeescript?
I know a lot of people don't like the extra translation effort to debugging, and some aren't fond of significant whitespace, but I'm surprised that that's enough to make it into the top 5 most dreaded. Is there something else I'm missing?
Debugging compiled code is absolutely unpleasant. Fortunately, I only have to do it rarely. From what I can tell, debugging JavaScript that was compiled from CoffeeScript is a standard practice, and I simply don't want to pursue that. It's interesting how you describe CoffeeScript as a tool rather than a language, but in my opinion it is still a very leaky abstraction.
As I mentioned, I look forward to revisiting it when a standard toolset has matured.
Not surprising. If you've ever had to work with CoffeeScript in a large code base with multiple developers, it's . . . not ideal. I can't stand it, personally.
I'd hardly characterise coffeescript generated js as difficult to debug (even the OO flavoured bits). My experience and that of most others I've seen online is that the mapping from the js that you debug back to the coffeescript that generated is trivially done in your head.
Nice to see this, as it seems to address one of the most common concerns about using CoffeeScript. I have to wonder, though, how many minds will it really change? Maybe a lot, but I'm wondering how this will pan out. I'm guessing some people provide line matching for debugging as a concern but will continue to move the goal posts as this and other barriers are removed.
I feel like that's a pattern I see around here, which is odd because if you'd rather just use javascript that seems totally reasonable without an excuse.
reply