From 056e5b951bb47a33793ffef8315cefe3363945ab Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 26 Aug 2016 12:06:15 -0700 Subject: [PATCH] Set process._debugWaitConnect with --debug-brk is specified --- atom/common/node_bindings.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/atom/common/node_bindings.cc b/atom/common/node_bindings.cc index d1db83b70850..36b125fefb6e 100644 --- a/atom/common/node_bindings.cc +++ b/atom/common/node_bindings.cc @@ -185,6 +185,10 @@ node::Environment* NodeBindings::CreateEnvironment( base::FilePath helper_exec_path; PathService::Get(content::CHILD_PROCESS_EXE, &helper_exec_path); process.Set("helperExecPath", helper_exec_path); + + if (base::CommandLine::ForCurrentProcess()->HasSwitch("debug-brk")) + process.Set("_debugWaitConnect", true); + return env; }