Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/node_options.cc
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,6 +23,7 @@ namespace options_parser {
// TODO(addaleax): Make that unnecessary.

DebugOptionsParser::DebugOptionsParser() {
#if HAVE_INSPECTOR
AddOption("--inspect-port",
"set host:port for inspector",
&DebugOptions::host_port,
Expand DownExpand Up@@ -52,6 +53,7 @@ DebugOptionsParser::DebugOptionsParser() {
AddOption("--debug-brk", "", &DebugOptions::break_first_line);
Implies("--debug-brk", "--debug");
AddAlias("--debug-brk=", { "--inspect-port", "--debug-brk" });
#endif
}

DebugOptionsParser DebugOptionsParser::instance;
Expand Down
10 changes: 6 additions & 4 deletions test/parallel/test-cli-bad-options.js
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,10 +6,12 @@ require('../common');
const assert = require('assert');
const spawn = require('child_process').spawnSync;

requiresArgument('--inspect-port');
requiresArgument('--inspect-port=');
requiresArgument('--debug-port');
requiresArgument('--debug-port=');
if (process.config.variables.v8_enable_inspector === 1) {
requiresArgument('--inspect-port');
requiresArgument('--inspect-port=');
requiresArgument('--debug-port');
requiresArgument('--debug-port=');
}
requiresArgument('--eval');

function requiresArgument(option) {
Expand Down