So, I understood the solution.
I installed node-inspector (the wonderful part of BTW) and compiled node in debug mode. Remember to activate it: node-inspector & will launch it in the background.
After that, I started the node process with the V8 debug flag:
node --debug script.js
The tricky part was getting an endless loop to reappear, but after 20 minutes I got lucky and it happened. I used the inspector interface to pause the program (pause button on the right) and then check where the stack is. Sometimes a pause will occur in the native code, but you can pause it and resume until you return to JavaScript.
Success:)
source share