Does anyone know how to print a stack trace in Node.js?
转载于:https://stackoverflow.com/questions/2923858/how-to-print-a-stack-trace-in-node-js
Does anyone know how to print a stack trace in Node.js?
转载于:https://stackoverflow.com/questions/2923858/how-to-print-a-stack-trace-in-node-js
Any Error
object has a stack
member that traps the point at which it was constructed.
var stack = new Error().stack
console.log( stack )
or more simply:
console.trace("Here I am!")