Debugging local nodejs script in chrome dev tools
<p>I have a stand alone node js script. 
I am doing some local task with that script. I want to debug that script in chrome dev tools. I know I can debug it locally via putting debugger in code but do not want to do that.</p>

<p>On nodejs docs I saw that it has some options like - </p>

<blockquote>
  <p>V8 Inspector Integration for Node.js# NOTE: This is an experimental
  feature.</p>
  
  <p>V8 Inspector integration allows attaching Chrome DevTools to Node.js
  instances for debugging and profiling.</p>
  
  <p>V8 Inspector can be enabled by passing the --inspect flag when
  starting a Node.js application. It is also possible to supply a custom
  port with that flag, e.g. --inspect=9222 will accept DevTools
  connections on port 9222.</p>
  
  <p>To break on the first line of the application code, provide the
  --debug-brk flag in addition to --inspect.</p>
  
  <p><strong>$ node --inspect index.js</strong></p>
</blockquote>

<p>But when I do that it gives me error like -</p>

<pre><code>$ node --inspect index.js
node: bad option: --inspect
</code></pre>

<p>My node version is:</p>

<pre><code>$ node --version
v4.4.7
</code></pre>