I’m using some ES6 features (WeakMaps) in my node project. I’m trying out Komodo IDE, and in the Debugger Options, I tried to pass in --harmony and/or --harmony-collections into the Interpreter Arguments and Script Arguments. The debugger session ends prematurely, and only through checking Debug in Separate Console did I see that node does not recognize what WeakMaps are, therefore the flag(s) are not being correctly passed in.
When I run my app from the command line, with the harmony flag, there are no errors and my app runs as expected.
When I try to run or debug from within Komodo, I get this error:
/Users/andrew/app/node_modules/mozart/lib/class.js:7
var constructorToClassMap = new WeakMap();
^
ReferenceError: WeakMap is not defined
at Object.<anonymous> (/Users/andrew/app/node_modules/mozart/lib/class.js:7:33)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/Users/andrew/app/node_modules/mozart/index.js:1:75)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
Press RETURN to continue ...
(Mozart is a classical inheritance library that uses WeakMaps to create private variables.)