Running node-inspector alongside nodemon?
You would start your server with nodemon --debug server.js
and then you'll need to run node-inspector in a separate terminal window unless you push nodemon to the background.
If you want to run them as one command this works for me: node-inspector & nodemon --debug app.js
(replacing app.js with the name of your script). If things get all mucked up you will occasionally have to kill node-inspector manually, but running the command this way gives you the option of running rs
to restart nodemon manually if needed. HTH
For those that want an OS-independent solution and no hacks for windows, etc.
You can use npm-run-all which is a CLI tool that allows running multiple npm scripts in parallel or sequentially. So you'd set your package.json as so:
"scripts": {
"start": "npm-run-all --parallel lint start:debug start:server",
"lint": "eslint . --ext .js",
"start:debug": "node-debug server.js",
"start:server": "nodemon server.js"
}
And then from CLI, you do: npm start
Caveat: from my experience running nodemon and node-debug together leads to weird node-inspector behaviors sometimes. So i've since opted to remove nodemon from my scripts when debugging and relying on node-inspectors save-live-edit feature to change files on the fly.