Following the below steps will give you the following features:
Note: Please remember, since JavaScript is a dynamic language, the code completion is typically over generous, and there are no guarantees that those properties or methods actually exist. Turning off Preferences > Languages & Frameworks > JavaScript > Weaker type guess for completions to limit the suggestions.
Steps:
Preferences > Languages & Frameworks > JavaScript:
JavaScript language version => ECMAScript 6
Prefer Strict mode => checkedCopy your node path to the clipboard
$ which node | pbcopy # copy path into clipboard
Preferences > Languages & Frameworks > Node.js and NPM
Node interpreter => [paste path from previous step]
Sources of Node.js Core Modules => https://nodejs.org/dist/v4.0.0/node-v4.0.0.tar.gz (match to your installed version)Click Apply at the bottom of the current Preferences window
In Preferences > Languages & Frameworks > JavaScript > Libraries, enable the following:
Node.js v4.0.0 Core ModulesECMAScript 6Node.js GlobalsClick Okay at the bottom of the current Preferences window
Run > Edit Configurations... > Defaults > Node.js
Node interpreter: => Same "Node interpreter" value from above (which node | pbcopy)Node parameters: => --harmony --use-strict
Working directory: => Project rootJavaScript file: => index.js or your main project fileNow you can freely add breakpoints in the gutter (the space just to the left of your code) and debug with Run > Debug (^D)! Super exciting!
