jashkenas / jashkenas/coffeescript

Better debugging

Open
#5,303 3 comments 4 reactions 0 assignees View on GitHub
Dominant language
CoffeeScript
Stars
16.6k
Forks
2k
PR merge metrics
No merged PRs in 30d

Description

Please provide better debugging, as transpiling to JS is confusing. I'll give an example.
![image](https://user-images.githubusercontent.com/48339289/74399919-44714900-4dd1-11ea-82b5-8fef7432b5a5.png)

Basically, the error is thrown for the code transpiled to JS, as so:
```
Thrown:
filename:line
code_transpiled_to_js

JS Exception goes here
```
I'd say it could look like
```
Thrown:
filename:line
code_in_coffee
JS Exception goes here
Original error:
filename:line
code_transpiled_to_js
```
Due to line numbering differences and sometimes very very different syntax, it's hard to figure out what a JS error means especially if you're used to seeing the coffeescript. And the line number surely points you in the wrong direction.

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named; start by locating the compiler's error-reporting and transpilation paths, then inspect how source locations are currently selected. Done should be defined as reporting the CoffeeScript location alongside the transpiled JavaScript location and preserving the original exception details.

Written by the indexing model from the issue text.

Assessment

Tech stack
coffeescript, javascript
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.