1

我将 Coffeescript 编译器配置为使用 IntelliJ 和 NodeJS 运行 map (-m)。我假设使用源映射我应该能够在 Chrome 开发人员工具中的咖啡脚本文件中进行调试。检查了启用源映射。我尝试打开任何 .coffee 文件,但出现“无法获取 /path.../foo.coffee”错误。咖啡脚本文件在源资源管理器中所在的文件夹很奇怪。../../../../../Web/src/test/webapps/installManager

我认为它反映了地图上的内容。

"sourceRoot": "../../../../..",
"sources": [
   "Web/src/test/webapps/installManager/app.coffee"
],

我的 js 文件中确实有 sourceMappingURL。/* //@ sourceMappingURL=Common.map */

以下是我运行 Coffeescript 编译器的配置:

应用参数:-cwm /home/repository/svn/ding/Web/src/test/webapps

既然地图现在可用,为什么 Chrome 不能获取咖啡文件?是因为 sourceRoot 中的路径和地图中的来源吗?

我能够在 Chrome 金丝雀中添加工作区并映射它们,甚至进行双向编辑,但我仍然无法调试(可以设置断点,但调试器从未在断点处停止)。

谢谢

4

1 回答 1

2

I fixed my problems - it was all in the cross references between the js coffee and map files. As soon as I configured it so that the transpiled .js was placed right next to the coffee (and the map, it picked it up.

于 2013-07-18T20:09:15.453 回答