title: how can I debug a node app that is started via the command line (cli) like forever or supervisor?
body: <p>I'm familiar with debugging my own node apps (usually with node-inspector). Today I'd like to debug someone else's program. I'm trying to track down an issue with <a href="https://github.com/petruisfan/node-supervisor" rel="noreferrer"><code>supervisor</code></a>. So naturally I just add a <code>--debug</code> (or <code>debug-brk</code>) to the command call, but it passes that to the code that it is supervising. </p>
  
  <p>I've tried adding <code>debugger</code> lines to the js file for supervisor but that didn't work (probably because no debugger was attached at that time). There's a bit of a race here -- I need to start the debugger and attach it to the supervisor process after it starts but before it processes its arguments from the command line. </p>
  
  <p>What I really want to do here is stop <code>supervisor</code> and debug it before it processes its command line arguments. How can I do this? </p>