Answer a question

I am trying to debug a CoffeeScript file in vs code. It works and I can step through the compiled.js files. However, I can't step through the actual CoffeeScript files.

Here is my launch.json file:

{
    "type": "node",
    "request": "launch",
    "name": "Launch Meeting",
    "program": "${workspaceRoot}/lib/meeting/meeting-service.coffee",
    "cwd": "${workspaceRoot}",
    "env": {
        "NODE_ENV": "local"
    },
    "sourceMaps": true
}

And in another window, I am running:

./node_modules/.bin/coffee -mc --watch lib/activity/note-activity-model.coffee \
                                       lib/activity/note-activity-publisher.coffee \
                                       lib/app-event-queue.coffee \
                                       lib/meeting/meeting-api.coffee \
                                       lib/meeting/meeting-service.coffee \
                                       lib/meeting/meeting-socket-service.coffee \
                                       lib/meeting/meeting-util.coffee

When I set a breakpoint in the coffee file, the debugger halts on the compiled js file. I need it on the coffee file.

Answers

Did you try to use

"stopOnEntry": true,
"smartStep": false

as described in https://github.com/Microsoft/vscode/issues/5963 ?

Also, always from that source, a working example (assuming a coffeescript file in your workspace named coffee.coffee:

{
    "name": "Coffee",
    "type": "node",
    "request": "launch",
    "program": "${workspaceRoot}/coffee.coffee",
    "cwd": "${workspaceRoot}",
    "sourceMaps": true,
    "stopOnEntry": true,
    "smartStep": false
}
Logo

开发云社区提供前沿行业资讯和优质的学习知识,同时提供优质稳定、价格优惠的云主机、数据库、网络、云储存等云服务产品

更多推荐