title: Missing function name in NodeJS stacktrace; why?
body: <p>NodeJS v0.10.31 under OS X, same behavior under NodeJS v0.12.2.</p>
  
  <p>My stack trace doesn't show the <code>test</code> function name when called normally:</p>
  
  <pre><code>function test() {
    throw new Error('Missing `test` in stack trace?');
  }
  
  try {
    test();
  } catch (e) {
    console.trace(e);
  }
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>Trace: [Error: Missing `test` in stack trace?]
      at Object.&lt;anonymous&gt; (no_stack_in_node.js:8:11)
      // etc.
  </code></pre>
  
  <p>If it's inside a <code>setTimeout</code> I see what I expect:</p>
  
  <pre><code>try {
    setTimeout(test, 0);
  } catch (e) {
    console.trace(e);
  }
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>Error: Missing `test` in stack trace?
      at test [as _onTimeout] (no_stack_in_node.js:2:9)
      at Timer.listOnTimeout [as ontimeout] (timers.js:112:15)
  </code></pre>
  
  <p>In the browser I see the latter in both cases.</p>
  
  <p>Is there something specific I'm missing, or is the environment of NodeJS's CLI interfering, e.g., the "top level object" behaves a bit differently?</p>