我不明白,我应该如何配置launch.json文件。例如,对于debug nodejs-scripts,我只是更改configurations.program路径,然后按F5,一切正常,但是如何处理咖啡脚本?
答案 0 :(得分:4)
老实说,我不知道VSCode。
但是您可以在监视模式下运行coffe-script编译器并生成映射文件,然后调试生成的javascript:
coffee -c -m -w coffe_source_folder/
答案 1 :(得分:0)
因为源地图,咖啡就像js。无论如何,这是我的launch.json:
{
"version": "0.2.0",
"configurations": [{
"type": "node",
"request": "launch",
"name": "Launch Program",
"skipFiles": [
"<node_internals>/**"
],
"program": "${file}", //important, make sure debug current file
"outFiles": [
"${workspaceFolder}/dist/api/api.js" //important, where to find sourcemap js file
]
}]
}