From 29fda66ca6a75eba46a3089575a80db4a9ac762f Mon Sep 17 00:00:00 2001 From: cjihrig Date: Tue, 9 Jul 2019 17:11:32 -0400 Subject: [PATCH] src: simplify --debug flags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-By: Jeremiah Senkpiel --- src/node_options.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/node_options.cc b/src/node_options.cc index 8666de948b6b3a..53a4171edaa399 100644 --- a/src/node_options.cc +++ b/src/node_options.cc @@ -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)",