-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should nodemon pass --inspect
(et al) to node automatically?
#1263
Should nodemon pass --inspect
(et al) to node automatically?
#1263
Comments
Question: how does nodemon know that |
I only found this in the README (which i believe is also the only doc):
Moreover it says later that the " Anyway i'm using the explicit version now. |
The Equally, I'd have to (to my knowledge) manually maintain a list of node arguments and filter for them and pass them across if present. Other tools (and nodemon) have tried this in the past, but when new flags are added to node, the tool doesn't know about them and thus doesn't pass them (i.e. If there was a way to iterate and maintain the list of supported node args, then there might be a dynamic solution. Though, I'm not totally against hard coding some common flags into nodemon, like |
--inspect
(et al) to node automatically?
Thinking aloud (as it were), maybe, if there's no script arguments to nodemon, it should pass everything (in order) to the This would solve the issue of edge cases like if something like ie, this would be possible:
Thoughts? |
Fixes #1263 The way it works: - If the script is detected via index.js from the directory, or from the package, then all the arguments on the CLI are shifted to execArgs - If there was a double-dash on the CLI args, then only those before the double-dash are given to execArgs and the rest remain passed to the script
I like the idea of the |
@eilgin nodemon has always supported the |
I didn't know that, i've started using |
Fixes #1263 The way it works: - If the script is detected via index.js from the directory, or from the package, then all the arguments on the CLI are shifted to execArgs - If there was a double-dash on the CLI args, then only those before the double-dash are given to execArgs and the rest remain passed to the script
This Pull Request updates dependency [nodemon](https://github.com/remy/nodemon) from `v1.11.0` to `v1.17.5` <details> <summary>Release Notes</summary> ### [`v1.17.5`](https://github.com/remy/nodemon/releases/v1.17.5) [Compare Source](remy/nodemon@ff79835...v1.17.5) ##### Bug Fixes * in watch, use fully filtered ignore rules ([b3fc3a9](remy/nodemon@b3fc3a9)), closes [#​1348](`https://github.com/remy/nodemon/issues/1348`) --- ### [`v1.17.4`](https://github.com/remy/nodemon/releases/v1.17.4) [Compare Source](remy/nodemon@6925494...v1.17.4) ##### Bug Fixes * {{filename}} is only replaced once ([f616258](remy/nodemon@f616258)) * increase perf of watching large file count ([58b82f2](remy/nodemon@58b82f2)), closes [#​1317](`https://github.com/remy/nodemon/issues/1317`) * only hook SIGINT on boot - not at require ([9bbc219](remy/nodemon@9bbc219)), closes [#​1326](`https://github.com/remy/nodemon/issues/1326`) * support env.SUPPRESS_SUPPORT ([#​1334](`https://github.com/remy/nodemon/issues/1334`)) ([ee2aac1](remy/nodemon@ee2aac1)) --- ### [`v1.17.3`](https://github.com/remy/nodemon/releases/v1.17.3) [Compare Source](remy/nodemon@v1.17.2...v1.17.3) ##### Bug Fixes * don't throw when required in the repl ([aa18c80](remy/nodemon@aa18c80)), closes [#​1292](`https://github.com/remy/nodemon/issues/1292`) --- ### [`v1.17.2`](https://github.com/remy/nodemon/releases/v1.17.2) [Compare Source](remy/nodemon@v1.17.1...v1.17.2) ##### Bug Fixes * prevent throw when args missing ([#​1288](`https://github.com/remy/nodemon/issues/1288`)) ([89d6062](remy/nodemon@89d6062)), closes [#​1286](`https://github.com/remy/nodemon/issues/1286`) * watch count regression ([#​1287](`https://github.com/remy/nodemon/issues/1287`)) ([372e6b2](remy/nodemon@372e6b2)), closes [#​1283](`https://github.com/remy/nodemon/issues/1283`) --- ### [`v1.17.1`](https://github.com/remy/nodemon/releases/v1.17.1) [Compare Source](remy/nodemon@v1.17.0...v1.17.1) ##### Bug Fixes * throwing exeception on run ([85ed19d](remy/nodemon@85ed19d)), closes [#​1276](`https://github.com/remy/nodemon/issues/1276`) --- ### [`v1.17.0`](https://github.com/remy/nodemon/releases/v1.17.0) [Compare Source](remy/nodemon@v1.16.1...v1.17.0) ##### Bug Fixes * make it possible for windows to checkout ([#​1270](`https://github.com/remy/nodemon/issues/1270`)) ([0f39b2e](remy/nodemon@0f39b2e)), closes [#​1255](`https://github.com/remy/nodemon/issues/1255`) * windows exec resolution ([#​1274](`https://github.com/remy/nodemon/issues/1274`)) ([7ffd545](remy/nodemon@7ffd545)), closes [#​1251](`https://github.com/remy/nodemon/issues/1251`) * make clear where more opts are in help ([#​1271](`https://github.com/remy/nodemon/issues/1271`)) ([f4391d4](remy/nodemon@f4391d4)) * put windows drive letter tweak in right place ([#​1272](`https://github.com/remy/nodemon/issues/1272`)) ([94b526f](remy/nodemon@94b526f)), closes [#​1263](`https://github.com/remy/nodemon/issues/1263`) ##### Features * try to resolve exec in node_modules/.bin ([#​1275](`https://github.com/remy/nodemon/issues/1275`)) ([7fb365d](remy/nodemon@7fb365d)), closes [#​1268](`https://github.com/remy/nodemon/issues/1268`) * feed args to exec when detecting script ([#​1273](`https://github.com/remy/nodemon/issues/1273`)) ([e41f3c3](remy/nodemon@e41f3c3)), closes [#​1263](`https://github.com/remy/nodemon/issues/1263`) _Note: due to an oddity in the automated build process, nodemon was bumped two minor versions instead of one. Nothing to worry about though._ --- ### [`v1.16.1`](remy/nodemon@v1.16.0...v1.16.1) [Compare Source](remy/nodemon@v1.16.0...v1.16.1) --- ### [`v1.16.0`](remy/nodemon@1cda8fa...v1.16.0) [Compare Source](remy/nodemon@1cda8fa...v1.16.0) --- ### [`v1.15.1`](https://github.com/remy/nodemon/releases/v1.15.1) [Compare Source](remy/nodemon@v1.15.0...v1.15.1) ##### Bug Fixes * ensure directories are watched, not files ([#​1260](`https://github.com/remy/nodemon/issues/1260`)) ([1cda8fa](remy/nodemon@1cda8fa)), closes [#​1259](`https://github.com/remy/nodemon/issues/1259`) --- ### [`v1.15.0`](https://github.com/remy/nodemon/releases/v1.15.0) [Compare Source](remy/nodemon@v1.14.12...v1.15.0) ##### Features * add support for `--spawn` ([#​1249](`https://github.com/remy/nodemon/issues/1249`)) ([5e88b04](remy/nodemon@5e88b04)), closes [#​1245](`https://github.com/remy/nodemon/issues/1245`) --- ### [`v1.14.12`](https://github.com/remy/nodemon/releases/v1.14.12) [Compare Source](remy/nodemon@v1.14.11...v1.14.12) ##### Bug Fixes * sniff for child.stdout before using it ([79e61f0](remy/nodemon@79e61f0)) * wrongly normalizing slashes in windows ([33fa6f4](remy/nodemon@33fa6f4)), closes [#​1236](`https://github.com/remy/nodemon/issues/1236`) --- ### [`v1.14.11`](https://github.com/remy/nodemon/releases/v1.14.11) [Compare Source](remy/nodemon@v1.14.10...v1.14.11) ##### Bug Fixes * don't ignore dot-directories ([4be493c](remy/nodemon@4be493c)), closes [#​1223](`https://github.com/remy/nodemon/issues/1223`) * update deps - chokidar@​2.0.0 in particular ([9d49852](remy/nodemon@9d49852)) --- ### [`v1.14.10`](https://github.com/remy/nodemon/releases/v1.14.10) [Compare Source](remy/nodemon@v1.14.9...v1.14.10) ##### Bug Fixes * node < 6.4.0 causing crash on 'rs' trigger ([e90f15a](remy/nodemon@e90f15a)), closes [#​1218](`https://github.com/remy/nodemon/issues/1218`) --- ### [`v1.14.9`](https://github.com/remy/nodemon/releases/v1.14.9) [Compare Source](remy/nodemon@64a82ff...v1.14.9) ##### Bug Fixes * correctly pass ignored rules to chokidar ([718a9ad](remy/nodemon@718a9ad)), closes [#​1202](`https://github.com/remy/nodemon/issues/1202`) * ignorePermissionErrors in chokidar ([e95ea6f](remy/nodemon@e95ea6f)) --- ### [`v1.14.8`](https://github.com/remy/nodemon/releases/v1.14.8) [Compare Source](remy/nodemon@6e7ce4b...v1.14.8) ##### Bug Fixes * clarify which config files are actually used ([2582d96](remy/nodemon@2582d96)), closes [#​1204](`https://github.com/remy/nodemon/issues/1204`) * fail gracefully if postinstall fails ([64a82ff](remy/nodemon@64a82ff)) --- ### [`v1.14.7`](https://github.com/remy/nodemon/releases/v1.14.7) [Compare Source](remy/nodemon@v1.14.6...v1.14.7) ##### Bug Fixes * swallow child.stdin err ([6e7ce4b](remy/nodemon@6e7ce4b)), closes [#​1195](`https://github.com/remy/nodemon/issues/1195`) --- ### [`v1.14.6`](https://github.com/remy/nodemon/releases/v1.14.6) [Compare Source](remy/nodemon@v1.14.5...v1.14.6) ##### Bug Fixes * watch both js and mjs files if main file is JavaScript ([d78bf3d](remy/nodemon@d78bf3d)) --- ### [`v1.14.5`](https://github.com/remy/nodemon/releases/v1.14.5) [Compare Source](remy/nodemon@v1.14.4...v1.14.5) ##### Bug Fixes * don't use fork with `node inspect` ([0d9a892](remy/nodemon@0d9a892)) --- ### [`v1.14.4`](https://github.com/remy/nodemon/releases/v1.14.4) [Compare Source](remy/nodemon@v1.14.3...v1.14.4) ##### Bug Fixes * expose no update flag ([c637717](remy/nodemon@c637717)) * handle exit(2) better ([5a914cb](remy/nodemon@5a914cb)) * incorrect count of watch files being reported ([7a04e2c](remy/nodemon@7a04e2c)), closes [#​1194](`https://github.com/remy/nodemon/issues/1194`) * properly handle --no-update-notifier ([48048aa](remy/nodemon@48048aa)) * support implicit filename extension ([6e839d4](remy/nodemon@6e839d4)), closes [#​1193](`https://github.com/remy/nodemon/issues/1193`) --- ### [`v1.14.3`](https://github.com/remy/nodemon/releases/v1.14.3) [Compare Source](remy/nodemon@v1.14.2...v1.14.3) ##### Bug Fixes * ensure non-slurp is passed to script ([ad226af](remy/nodemon@ad226af)), closes [#​750](`https://github.com/remy/nodemon/issues/750`) --- ### [`v1.14.2`](https://github.com/remy/nodemon/releases/v1.14.2) [Compare Source](remy/nodemon@v1.14.1...v1.14.2) ##### Bug Fixes * stop saying there's another update required! ([dcd8911](remy/nodemon@dcd8911)) --- ### [`v1.14.1`](https://github.com/remy/nodemon/releases/v1.14.1) [Compare Source](remy/nodemon@v1.14.0...v1.14.1) ##### Bug Fixes * defined diretory watching ([1e2516d](remy/nodemon@1e2516d)) * pass stdin to child process on -I ([1d88943](remy/nodemon@1d88943)), closes [#​1036](`https://github.com/remy/nodemon/issues/1036`) * properly ignore defaults, don't match partial ([4589bc8](remy/nodemon@4589bc8)), closes [#​916](`https://github.com/remy/nodemon/issues/916`) --- ### [`v1.14.0`](https://github.com/remy/nodemon/releases/v1.14.0) [Compare Source](remy/nodemon@v1.13.3...v1.14.0) ##### Bug Fixes * remove scoped dep ([d15cf68](remy/nodemon@d15cf68)), closes [#​1180](`https://github.com/remy/nodemon/issues/1180`) ##### Features * support wildcard extension matching ([009d868](remy/nodemon@009d868)) --- ### [`v1.13.3`](https://github.com/remy/nodemon/releases/v1.13.3) [Compare Source](remy/nodemon@v1.13.2...v1.13.3) ##### Bug Fixes * nodemon reporting crash ([1171fc1](remy/nodemon@1171fc1)), closes [#​1173](`https://github.com/remy/nodemon/issues/1173`) --- ### [`v1.13.2`](https://github.com/remy/nodemon/releases/v1.13.2) [Compare Source](remy/nodemon@v1.13.1...v1.13.2) ##### Bug Fixes * switch to killing using numericals ([e9129c0](remy/nodemon@e9129c0)), closes [#​956](`https://github.com/remy/nodemon/issues/956`) [#​813](`https://github.com/remy/nodemon/issues/813`) --- ### [`v1.13.1`](https://github.com/remy/nodemon/releases/v1.13.1) [Compare Source](remy/nodemon@v1.13.0...v1.13.1) ##### Bug Fixes * fixed an issue where we tried to resolve null as path ([10ded94](remy/nodemon@10ded94)) * if no ps, walk /proc to kill child fully ([bf9b7a6](remy/nodemon@bf9b7a6)) --- ### [`v1.13.0`](https://github.com/remy/nodemon/releases/v1.13.0) [Compare Source](remy/nodemon@v1.12.7...v1.13.0) ##### Bug Fixes * support nodemon index to expand to index.js ([a282afb](remy/nodemon@a282afb)), closes [#​1165](`https://github.com/remy/nodemon/issues/1165`) ##### Features * support SIGHUP to restart nodemon ([30f999a](remy/nodemon@30f999a)), closes [#​393](`https://github.com/remy/nodemon/issues/393`) * watch script regardless of extension ([f8a5abe](remy/nodemon@f8a5abe)), closes [#​461](`https://github.com/remy/nodemon/issues/461`) --- ### [`v1.12.7`](https://github.com/remy/nodemon/releases/v1.12.7) [Compare Source](remy/nodemon@v1.12.6...v1.12.7) ##### Bug Fixes * defensive check on accessing cmd.args ([fd961d6](remy/nodemon@fd961d6)) * support node arguments again ([d9e93ad](remy/nodemon@d9e93ad)), closes [#​1161](`https://github.com/remy/nodemon/issues/1161`) --- ### [`v1.12.6`](https://github.com/remy/nodemon/releases/v1.12.6) [Compare Source](remy/nodemon@v1.12.5...v1.12.6) ##### Bug Fixes * get tests to pass ([cf923a8](remy/nodemon@cf923a8)) * only use fork if node>4 ([f52615c](remy/nodemon@f52615c)) * restore node 4 min support ([6d760f4](remy/nodemon@6d760f4)) * travis CI build before-install ([3a6b8df](remy/nodemon@3a6b8df)) --- ### [`v1.12.5`](https://github.com/remy/nodemon/releases/v1.12.5) [Compare Source](remy/nodemon@v1.12.4...v1.12.5) ##### Bug Fixes * pass through execArgs from config ([#​1142](`https://github.com/remy/nodemon/issues/1142`)) ([6a4fb22](remy/nodemon@6a4fb22)) --- ### [`v1.12.4`](https://github.com/remy/nodemon/releases/v1.12.4) [Compare Source](remy/nodemon@v1.12.3...v1.12.4) ##### Bug Fixes * reduce help output (a teeny bit) ([2e1b496](remy/nodemon@2e1b496)) --- ### [`v1.12.3`](https://github.com/remy/nodemon/releases/v1.12.3) [Compare Source](remy/nodemon@24a4b84...v1.12.3) ##### Bug Fixes * add commit lint ([2af6391](remy/nodemon@2af6391)) * Add support for multi-level filenames ([29a9a44](remy/nodemon@29a9a44)) * bump deps and fix tests for local dev ([#​1139](`https://github.com/remy/nodemon/issues/1139`)) ([6d57dac](remy/nodemon@6d57dac)) * catch module.parent.filename === undefined ([#​1053](`https://github.com/remy/nodemon/issues/1053`)) ([4c81e9a](remy/nodemon@4c81e9a)) * crash when passing argument to node (windows) ([469fa80](remy/nodemon@469fa80)), closes [#​1095](`https://github.com/remy/nodemon/issues/1095`) * executable path handling under windows ([#​962](`https://github.com/remy/nodemon/issues/962`)) ([481dc8f](remy/nodemon@481dc8f)) * exit when fail to parse the config file ([#​921](`https://github.com/remy/nodemon/issues/921`)) ([63e8606](remy/nodemon@63e8606)), closes [#​651](`https://github.com/remy/nodemon/issues/651`) * exit with code 1 on crash if --exitcrash ([#​946](`https://github.com/remy/nodemon/issues/946`)) ([facc8cb](remy/nodemon@facc8cb)) * help truncation on node 6.2 ([#​842](`https://github.com/remy/nodemon/issues/842`)) ([#​843](`https://github.com/remy/nodemon/issues/843`)) ([abc138f](remy/nodemon@abc138f)) * read config file before defaulting script parameter ([#​1110](`https://github.com/remy/nodemon/issues/1110`)) ([f3e0c29](remy/nodemon@f3e0c29)) * require node 6 or above in engines ([71eab1a](remy/nodemon@71eab1a)) * Support for .mjs es6 modules ([#​1138](`https://github.com/remy/nodemon/issues/1138`)) ([5a89df6](remy/nodemon@5a89df6)) * support signal on CLI ([#​1061](`https://github.com/remy/nodemon/issues/1061`)) ([3c352f2](remy/nodemon@3c352f2)) * sync help.txt to available options ([9b6c786](remy/nodemon@9b6c786)) * update readme ([3426224](remy/nodemon@3426224)) ##### Features * nodemonConfig support in package.json ([fb5da38](remy/nodemon@fb5da38)), closes [#​873](`https://github.com/remy/nodemon/issues/873`) --- ### [`v1.12.2`](remy/nodemon@469fa80...24a4b84) [Compare Source](remy/nodemon@469fa80...24a4b84) --- ### [`v1.12.1`](remy/nodemon@6a4803d...469fa80) [Compare Source](remy/nodemon@6a4803d...469fa80) --- ### [`v1.12.0`](remy/nodemon@8204b69...6a4803d) [Compare Source](remy/nodemon@8204b69...6a4803d) --- ### [`v1.11.1`](remy/nodemon@v1.11.0...8204b69) [Compare Source](remy/nodemon@v1.11.0...8204b69) --- </details> --- This PR has been generated by [Renovate Bot](https://renovatebot.com).
In version 1.19.2 the |
nodemon -v
: 1.15.1node -v
: 8.9.4Expected behaviour
Expect to run
node --inspect index.js
. It should work without specifying the default JS file (nodemon
should look for the file defined in "main").Actual behaviour
It runs
node index.js --inspect
which doesn't start the debugger. It works only if i specify the JS file withnodemon --inspect index.js
.Steps to reproduce
Just run
nodemon --inspect
If applicable, please append the
--dump
flag on your command and include the output here ensuring to remove any sensitive/personal details or tokens.The text was updated successfully, but these errors were encountered: