Browse Source

Set process._debugWaitConnect with --debug-brk is specified

Kevin Sawicki 8 years ago
parent
commit
056e5b951b
1 changed files with 4 additions and 0 deletions
  1. 4 0
      atom/common/node_bindings.cc

+ 4 - 0
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;
 }