title: Trace and log all javascript functions calling tree/graph?
body: <p>Is it possible to see all javascript function calls as a tree in any web debugger?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I mean debugger could remember each function call, from which other function it was done, also it could remember stack frame per each call and entire DOM snapshot.</p>
  
  <p><strong>UPDATE 2</strong></p>
  
  <p>The following page code:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta charset="UTF-8"&gt;
  &lt;title&gt;Trace and log all javascript functions calling tree/graph?&lt;/title&gt;
  
  &lt;script type="text/javascript"&gt;
  
      function init() {
  
          setDiv2("This div text was changed once");
          setDiv2("This div text was changed twice");
  
      };
  
      function setDiv2(text) {
          document.getElementById("div2").innerHTML = text;
      }
  
      window.onload = init;
  
  &lt;/script&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
  
      &lt;h1&gt;Trace and log all javascript functions calling tree/graph?&lt;/h1&gt;
  
      &lt;p&gt;&lt;a href="http://stackoverflow.com/questions/20910262/trace-and-log-all-javascript-functions-calling-tree-graph"&gt;Stack Overflow Question #20910262&lt;/a&gt;&lt;/p&gt;
  
      &lt;div id="div1"&gt;This div will not changed&lt;/div&gt;
  
      &lt;div id="div2"&gt;This div text will change&lt;/div&gt;
  
      &lt;div&gt;
  
      &lt;h2&gt;The call graph should be follows&lt;/h2&gt;
  
  
  
      &lt;/div&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Should give the following call graph</p>
  
  <p><img src="https://i.stack.imgur.com/9AE9j.jpg" alt="enter image description here"></p>
  
  <p>because <code>setDiv2()</code> function called twice.</p>
  
  <p>In profiler's top-down view it is visible as</p>
  
  <p><img src="https://i.stack.imgur.com/3aaxK.jpg" alt="enter image description here"></p>
  
  <p>where <code>setDiv2()</code> function drawn once. This is good for profiling, but this is not call graph.</p>
  
  <p>So the question persists.</p>
  
  <p><strong>UPDATE 3</strong></p>
  
  <p>Moreover, users should be able to step on each tree node and see the values of all variables and the state of entire DOM tree at the moment, represented by the node.</p>