src: simplify --debug flags

Any use of --debug, --debug=, --debug-brk, or --debug-brk=
now triggers an error. That means we can eliminate their
aliases with --inspect counterparts and simplify the code.

PR-URL: https://github.com/nodejs/node/pull/28615
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
This commit is contained in:
cjihrig 2019-07-09 17:11:32 -04:00
parent 84ad92d2e7
commit 2c5716bd72
No known key found for this signature in database
GPG Key ID: 7434390BDBE9B9C5

View File

@ -270,7 +270,9 @@ DebugOptionsParser::DebugOptionsParser() {
AddAlias("--inspect=", { "--inspect-port", "--inspect" });
AddOption("--debug", "", &DebugOptions::deprecated_debug);
AddAlias("--debug=", { "--inspect-port", "--debug" });
AddAlias("--debug=", "--debug");
AddOption("--debug-brk", "", &DebugOptions::deprecated_debug);
AddAlias("--debug-brk=", "--debug-brk");
AddOption("--inspect-brk",
"activate inspector on host:port and break at start of user script",
@ -283,10 +285,6 @@ DebugOptionsParser::DebugOptionsParser() {
Implies("--inspect-brk-node", "--inspect");
AddAlias("--inspect-brk-node=", { "--inspect-port", "--inspect-brk-node" });
AddOption("--debug-brk", "", &DebugOptions::break_first_line);
Implies("--debug-brk", "--debug");
AddAlias("--debug-brk=", { "--inspect-port", "--debug-brk" });
AddOption("--inspect-publish-uid",
"comma separated list of destinations for inspector uid"
"(default: stderr,http)",