title: Javascript backtrace
body: <p>How to I get a backtrace in Javascript?</p>
  <p>Ideal features:</p>
  <ul>
  <li>entry function name, or some meaningful identifier for anonymous functions,</li>
  <li>argument list at each level,</li>
  <li>line numbers.</li>
  </ul>
  <p>Can this be done in standard ECMAScript?</p>
  <p>If not, can it be done in the common web browser dialects?</p>
  <p>Thanks.</p>
  <h2>Edit --</h2>
  <p>Thanks for your suggestions.</p>
  <p>My dialect doesnot support <code>arguments.caller</code> or <code>arguments.callee</code>.</p>
  <p>I can do this:</p>
  <pre><code>try {
      let x = null;
      x .foo ();
  }
  catch (e) {
          debug (dump (e.stack));
  }
  </code></pre>
  <p>Which gets me the information as a string, which is okay for at-a-glance, but it would be a great help to walk <code>e.stack</code>. Does it have a standard form?</p>
  <p>Thanks again.</p>