title: nodejs, how to do debugging using GDB
body: <p>After searching in google, I found the below way to do gdb on nodejs application,
  build node with ./configure --debug option and then do </p>
  
  <pre><code>  gdb --args ~/node_g start.js
  </code></pre>
  
  <p>Using this I am trying to debug a small program, but after setting the breakpoint, I am not able to see that it is breaking in that function, </p>
  
  <p>My simple program gdb_node.js looks like this:</p>
  
  <pre><code> function abc() {
      console.log("In abc");
   }
  
   function bcd() {
      abc();
      console.log("Done abc");
   }
  
   bcd();
  </code></pre>
  
  <p>Now I am issuing gdb:</p>
  
  <pre><code>(gdb) b bcd
   Function "bcd" not defined.
   Make breakpoint pending on future shared library load? (y or [n]) y
   Breakpoint 1 (bcd) pending.
   (gdb) run
   Starting program: /Users/mayukh/node_g gdb_node.js
   Reading symbols for shared libraries  
  </code></pre>
  
  <p>++++......................................................................................................................................... done</p>
  
  <pre><code> In abc
   Done abc
  
   Program exited normally.
   (gdb) 
  </code></pre>
  
  <p>Can someone please let me know what I am missing here?</p>
  
  <p>Regards,
  -M-</p>