了解Node中console.trace()的输出

从命令行inputconsole.trace()会吐出来:

 at repl:1:10 at REPLServer.eval (repl.js:80:21) at Interface.<anonymous> (repl.js:182:12) at Interface.emit (events.js:67:17) at Interface._onLine (readline.js:162:10) at Interface._line (readline.js:426:8) at Interface._ttyWrite (readline.js:603:14) at ReadStream.<anonymous> (readline.js:82:12) at ReadStream.emit (events.js:88:20) at ReadStream._emitKey (tty.js:309:10) 

有人能快速的把我弄糟吗?

这是您当前的堆栈打印。 显然你调用了一些由repl.js (line 80, column 20) eval()中的eval()调用的脚本的console.trace() ,这个脚本被repl.js line 182调用,被events.js (line 67)等等。你必须自上而下读取它。