节点不能启用和声function

尝试运行这些新function,如http://h3manth.com/new/blog/2013/es6-on-nodejs/ ,特别是我的本地节点环境中的生成器 。 任何原因当我在0.11.4之前的任何节点版本上运行node --harmony --use-strict es6.js es6.js我得到的错误

 function *Counter() { ^ SyntaxError: Unexpected token * etc... 

它适用于任何版本0.11.4和之后,但是当我添加一个--debug-brk语句

 global.v8debug.Debug.setBreakPoint(compiledWrapper, 0, 0); ^ ReferenceError: break_point is not defined 

不知道为什么它给了我启用和谐的选项,但不能在以前的版本中使用它,为什么我不能debugging更高版本?

--harmony-generators已被添加到节点v0.11,这当然是为什么你的代码不能被parsing。

--use-strict打破debugging是一个问题,因为刚才修复的是node v0.12开发分支 。

如果您想从最新的源代码构build您自己的节点版本,则应该能够debugging您的发生器!

来源: https : //github.com/joyent/node/issues/8685