Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/unity3d/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 了解节点中console.trace()的输出_Node.js - Fatal编程技术网

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

Node.js 了解节点中console.trace()的输出,node.js,Node.js,在命令行中,键入console.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 Interf

在命令行中,键入
console.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)
回复时的
1:10
在REPLServer.eval(repl.js:80:21)
在接口处。(回复js:182:12)
在Interface.emit(events.js:67:17)
在接口处在线(readline.js:162:10)
在接口处。\u行(readline.js:426:8)
在接口处写入(readline.js:603:14)
在ReadStream。(readline.js:82:12)
在ReadStream.emit(events.js:88:20)
在ReadStream._emitKey(tty.js:309:10)

有人能快点带我走过这乱七八糟的地方吗?

这是您当前堆栈中的打印内容。显然,您调用了
console.trace()
,该脚本由
repl.js(第80行,第20列)
中的
eval()
调用,由
repl.js第182行调用,由
events.js(第67行)
等调用。您必须自上而下阅读该脚本。

谢谢。第一行是什么:
在repl:1:10
?repl是调用
eval
的javascript文件的名称。因此node.js中的新作用域将被命名为您要评估的文件。可能是您的eval脚本的第10列的第一行抛出了异常,但是这些结果可能非常不可预测,所以可能在其他地方。