Debugging CoffeeScript line-by-line

前端 未结 6 1742
遥遥无期
遥遥无期 2021-01-30 10:20

Is there a way to debug CoffeeScript line-by-line?

I understand that it compiles into Javascript. But this sounds like it could make it a pain to debug.

6条回答
  •  清歌不尽
    2021-01-30 11:17

    now is 2020, i find this question, and then i find vscode support sourcemap, so we can use vscode to debug coffee directly.

    btw, i think coffee need a great improve. just like static data. anyway here is my launch.json:

    {
        "version": "0.2.0",
        "configurations": [{
            "type": "node",
            "request": "launch",
            "name": "Launch Program",
            "skipFiles": [
                "/**"
            ],
            "program": "${file}", //important, make sure debug current file
            "outFiles": [
                "${workspaceFolder}/dist/api/api.js" //important, where to find sourcemap js file
            ]
        }]
    }
    

提交回复
热议问题