如何使用 webstorm 6 源映射在 node.js 中调试咖啡脚本 [英] how to debug coffeescript in node.js with webstorm 6 source maps

查看:23
本文介绍了如何使用 webstorm 6 源映射在 node.js 中调试咖啡脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经设置了这个视频中的咖啡脚本文件观察器

I've set up the coffeescript file watcher like in this video

http://www.youtube.com/watch?v=Sl1Uk3zT5Fg

这似乎适用于使用 google chrome 调试的 html 项目.但是,当我开始调试并在 node.js 项目的咖啡脚本文件中设置断点时,它没有命中断点.但是,在生成的 js 文件中设置断点确实会受到影响.

Which seems to work fine for an html project debugging with google chrome. However, when I start debugging and set a breakpoint in the coffeescript file in a node.js project, it doesn't hit the breakpoint. Setting a breakpoint in the generated js file does however get hit.

调试器需要做什么才能使用生成的源映射并在 webstorm 6 中使用 node.js 逐步执行咖啡脚本?

What do I need to do for the debugger to use the generated source maps and step through the coffeescript with node.js in webstorm 6?

推荐答案

刚刚发布的 CoffeeScript 1.6.2 现在在底部有源映射的注释,正如 WebStorm 所期望的那样,它现在可以正常工作了.

The just released CoffeeScript 1.6.2 now has the annotation for the source map at the bottom as WebStorm expects so it now works as expected.

这篇关于如何使用 webstorm 6 源映射在 node.js 中调试咖啡脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆