Nodemon: --debug options for nodejs get ignored when using nodemon.json

Created on 1 Mar 2016  ยท  2Comments  ยท  Source: remy/nodemon

Hi there,

When using a nodemon.json file all options with --debug appear to not work using Version 1.9.1.

โฏ nodemon --debug index.js
[nodemon] 1.9.1
[nodemon] reading config <PATH>/nodemon.json
[nodemon] to restart at any time, enter `rs`
[nodemon] ignoring: .git .nyc_output .sass-cache bower_components coverage <PATH>/node_modules/**/* .git ./node_modules/**/*
[nodemon] watching: *.json *.js .env .env-docker package.json
[nodemon] watching extensions: js
[nodemon] bind restart -> `osascript -e 'display notification "App restarted due to:
'$FILENAME'" with title "nodemon"'`
[nodemon] starting `node index.js --debug index.js`
[nodemon] child pid: 16618
[nodemon] watching 26 files

<APP STARTS>

Delete the nodemon.json:

โฏ nodemon --debug-brk index.js
[nodemon] 1.9.1
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node --debug-brk index.js`
Debugger listening on port 5858

nodemon.json:

{
    "restartable": "rs",
    "verbose": true,
    "ignore": [
        ".git",
        "./node_modules/*"
    ],
    "execMap": {
        "js": "node index.js"
    },
    "events": {
        "restart": "osascript -e 'display notification \"App restarted due to:\n'$FILENAME'\" with title \"nodemon\"'"
    },
    "watch": [
        "*.json",
        "*.js",
        ".env",
        ".env-docker",
        "package.json"
    ],
    "ext": "js"
}
stale

All 2 comments

This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up.
Thank you for contributing <3

Not sure if you already discovered the solution but adding this to the nodemon config file worked for me:

"nodeArgs": ["--debug"],
Was this page helpful?
0 / 5 - 0 ratings

Related issues

jonerer picture jonerer  ยท  4Comments

piton13 picture piton13  ยท  3Comments

maotora picture maotora  ยท  4Comments

Exeteres picture Exeteres  ยท  4Comments

giacomorebonato picture giacomorebonato  ยท  5Comments