title: Is there a way to get chrome-devtools (--inspect) to automatically detach from a process that has ended?
body: <p>The process, as it is: </p>
  
  <ol>
  <li><p>start code with --debug --inspect: </p>
  
  <p><code>"debug": "node --max-old-space-size=8192  --debug=5567  --inspect dist/index.js",</code></p></li>
  <li><p>Open devtools with url provided, something like: </p>
  
  <p><code>chrome-devtools://devtools/remote/serve_file/@62cd277117e6f8ec53e31b1be58290a6f7ab42ef/inspector.html?experiments=true&amp;v8only=true&amp;ws=localhost:9229/node</code> </p></li>
  <li><p>Do some debugging. </p></li>
  <li><p>Realize you have a bug, kill process (Ctrl-C) and make code changes. </p></li>
  <li><p>Restart. </p></li>
  <li><p>Start fails: <code>Unable to open devtools socket: address already in use</code></p></li>
  <li><p>Realize that you have to manually refresh the <code>chrome-devtools</code> page to get it to realize the process is no longer available. </p></li>
  </ol>
  
  <p>Node inspector was much better about this. Is there something I'm missing? Some flag that will make the <code>chrome-devtools</code> automatically detach from a process that has stopped? </p>
  
  <pre><code>$ versions
  npm 3.10.3
  node v6.7.0
  OS Darwin 15.6.0 Darwin Kernel Version 15.6.0
  </code></pre>
  
  <p>edit: I started using <strong>Node Inspector Manager</strong> (Chrome extension) and found that this whole process went much better. </p>