【发布时间】:2017-06-01 05:19:20
【问题描述】:
我使用以下命令启动我的脚本:
node --inspect=1234 index.js
然后打开 Chrome 开发工具 Inspector 并连接到它。
如果我输入console.log('hello'),它会工作并将消息输出到控制台。
但是,如果我键入脚本中包含的任何 function 或 variable,则会引发错误:
Uncaught ReferenceError: "my func / var" is not defined(...)(anonymous 函数)@VM107:1
如何让它看到并允许与我的脚本内容进行交互?
【问题讨论】:
标签: node.js google-chrome-devtools inspect web-inspector inspector