From 7dd1a7e6f4ff6003999929bd12c54afee011104d Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 26 Aug 2016 12:30:27 -0700 Subject: [PATCH] Only set _debugWaitConnect in main process --- atom/common/node_bindings.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/atom/common/node_bindings.cc b/atom/common/node_bindings.cc index 36b125fefb..f8e2573e0a 100644 --- a/atom/common/node_bindings.cc +++ b/atom/common/node_bindings.cc @@ -186,7 +186,10 @@ node::Environment* NodeBindings::CreateEnvironment( PathService::Get(content::CHILD_PROCESS_EXE, &helper_exec_path); process.Set("helperExecPath", helper_exec_path); - if (base::CommandLine::ForCurrentProcess()->HasSwitch("debug-brk")) + // Set process._debugWaitConnect if --debug-brk was specified to stop + // the debugger on the first line + if (is_browser_ && + base::CommandLine::ForCurrentProcess()->HasSwitch("debug-brk")) process.Set("_debugWaitConnect", true); return env;