【发布时间】:2017-09-10 16:52:49
【问题描述】:
我正在尝试使用 Git Bash 一个 nodejs 应用程序在调试模式下运行。 我做了好几次,但最近几次都不行了。
当我运行命令时:
npm run startwindows:inspect
上面写着:
14 Apr 15:10:59 - [nodemon] v1.4.1
14 Apr 15:10:59 - [nodemon] to restart at any time, enter `rs`
14 Apr 15:10:59 - [nodemon] ignoring: C:\XXX\.git/**/* C:\XXX\node_modules/**/* C:\XXX\bower_components/**/* .sass-cache
14 Apr 15:10:59 - [nodemon] watching: C:\XXX\server/**/* C:\XXX\config-local/**/*
14 Apr 15:10:59 - [nodemon] watching extensions: js,json,yaml
14 Apr 15:10:59 - [nodemon] starting `node --inspect --debug-brk energyreports.js`
14 Apr 15:10:59 - [nodemon] child pid: 6352
Unable to open devtools socket: address already in use
14 Apr 15:10:59 - [nodemon] app crashed - waiting for file changes before starting...
14 Apr 15:11:03 - [nodemon] watching 37,149 files
14 Apr 15:11:03 - [nodemon] watching 37,149 files - this might cause high cpu usage. To reduce use "--watch".
我可以提供更多的是 startwindows:inspect 是 package.json 文件中的一个脚本,它看起来像这样:
"startwindows:inspect":"set NODE_ENV=dus&& set NODE_CONFIG_DIR=./config-local/&& nodemon -V -w server -w config-local -e js,json,yaml --inspect --debug-brk| bunyan -o short"
使用--watch 是什么意思?在调试中测试时这是正常情况吗?我的 CPU % 利用率一直看起来都很好。
【问题讨论】:
标签: node.js bash npm git-bash nodemon