问题描述
我可以使用 JavaScript 使用此问题中的说明在 WebStorm 中进行 Meteor 调试(如何使用 WebStorm IDE 调试 Meteor 应用程序?).
I'm able to get Meteor debugging in WebStorm using JavaScript using the instructions in this question (How can I debug my Meteor app using the WebStorm IDE?).
但是,我似乎无法在 coffeescript 文件中设置断点.
However, I cannot seem to set breakpoints in coffeescript files.
可以这样做吗?
推荐答案
我在这个问题上摆弄了一段时间,但没有取得很大的成功.据我所知,为了让 WebStorm 支持 coffeescript 断点,它需要自己生成转译的 js 和映射文件……这会破坏流星,因为它会执行自己的咖啡脚本编译.
I fiddled with this for a while without any great success. From what I could gather, for WebStorm to support coffeescript breakpoints it needs to generate the transpiled js and map files itself... which will break meteor, as it does its own coffeescript compilation.
最后,我得到的最接近的是:
In the end, the closest I got was to:
使用节点调试器选项运行流星:
Run meteor with the node debugger options:
$ NODE_OPTIONS="--debug=47977" 流星
$ NODE_OPTIONS="--debug=47977" meteor
在 Webstorm 中设置 node.js 远程调试配置,将其指向相同的端口 (47977).
Setup a node.js remote debug configuration in Webstorm, pointing it at the same port (47977).
启动调试会话
在调试器的脚本"选项卡中显示的转译 js 文件中设置我的断点.令人困惑的是,在这些文件上设置断点时,我的 WebStorm (8.0.4) 版本并没有在装订线中显示通常的红色圆圈图标......但它确实设置了断点并在那里中断.
Set my breakpoints in the transpiled js files shown in the debugger's "scripts" tab. Confusingly, when setting breakpoints on these files, my version of WebStorm (8.0.4) did not show the usual red circle icon in the gutter... but it did set the breakpoint and break there.
所以不理想,但总比没有好,比使用节点检查器更方便!
So not ideal, but still better than nothing and more convenient than using node-inspector!
这篇关于如何使用 WebStorm IDE 在我的 Meteor 应用程序中调试 CoffeeScript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!



大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)