Skip to content

Commit

Permalink
src: simplify --debug flags
Browse files Browse the repository at this point in the history
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: #28615
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
  • Loading branch information
cjihrig authored and targos committed Jul 20, 2019
1 parent d7c7023 commit 29fda66
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/node_options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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)",
Expand Down

0 comments on commit 29fda66

Please sign in to comment.