【发布时间】:2019-08-08 16:37:07
【问题描述】:
通常我们喜欢 node --inspect your_file.js,
例如:node --inspect server.js
但是我的项目现在使用命令"npm run serve"来启动服务器
那么如何在 chrome 上调试呢?
在 package.json 中的脚本定义如下
"scripts": {
"lint": "eslint .",
"serve": "firebase serve --only functions",
"shell": "firebase functions:shell",
"start": "npm run shell",
"deploy_bkp": "firebase deploy --only functions",
"logs": "firebase functions:log",
"test": "mocha --timeout 10000 --reporter spec"
},
【问题讨论】:
-
不能在自己使用的代码编辑器中调试吗?
-
我用的是vscode,可以在vscode中调试node吗?
-
下面添加了答案,请查看
标签: javascript node.js debugging package.json