diff --git a/atom/browser/node_debugger.cc b/atom/browser/node_debugger.cc index b71e70fe0ff9..a31289f600f8 100644 --- a/atom/browser/node_debugger.cc +++ b/atom/browser/node_debugger.cc @@ -39,15 +39,18 @@ void NodeDebugger::Start() { auto options = std::make_shared(); std::vector exec_args; std::vector v8_args; - std::string error; + std::vector errors; node::options_parser::DebugOptionsParser::instance.Parse( &args, &exec_args, &v8_args, options.get(), - node::options_parser::kDisallowedInEnvironment, &error); + node::options_parser::kDisallowedInEnvironment, &errors); - if (!error.empty()) { + if (!errors.empty()) { + std::string error_str; + for (const auto& error : errors) + error_str += error; // TODO(jeremy): what's the appropriate behaviour here? - LOG(ERROR) << "Error parsing node options: " << error; + LOG(ERROR) << "Error parsing node options: " << error_str; } // Set process._debugWaitConnect if --inspect-brk was specified to stop @@ -58,7 +61,7 @@ void NodeDebugger::Start() { } const char* path = ""; - if (inspector->Start(path, options)) + if (inspector->Start(path, options, true /* is_main */)) DCHECK(env_->inspector_agent()->IsListening()); }