After searching google, I found the gdb way for nodejs below, build node c. / configure --debug and then run
gdb --args ~/node_g start.js
Using this, I am trying to debug a small program, but after setting a breakpoint, I canβt see that it breaks in this function,
My simple gdb_node.js program looks like this:
function abc() { console.log("In abc"); } function bcd() { abc(); console.log("Done abc"); } bcd();
Now I am issuing gdb:
(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
++++ .............................................. .................................................. ......................................... done
In abc Done abc Program exited normally. (gdb)
Can someone please let me know what I'm missing here?
Regards, -M -
source share