From 7a52a4cff11ed55387be81ace741d286874ca9b6 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 20 Apr 2015 14:10:15 +0800 Subject: [PATCH] Also enable the debugger --- atom/app/node_main.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/atom/app/node_main.cc b/atom/app/node_main.cc index dec2443525a..deae0bab406 100644 --- a/atom/app/node_main.cc +++ b/atom/app/node_main.cc @@ -26,12 +26,19 @@ int NodeMain(int argc, char *argv[]) { JavascriptEnvironment gin_env; node::Environment* env = node::CreateEnvironment( - gin_env.isolate(), gin_env.context(), argc, argv, exec_argc, exec_argv); + gin_env.isolate(), uv_default_loop(), gin_env.context(), argc, argv, + exec_argc, exec_argv); // Start debugger. if (node::use_debug_agent) node::StartDebug(env, node::debug_wait_connect); + node::LoadEnvironment(env); + + // Enable debugger. + if (node::use_debug_agent) + node::EnableDebug(env); + bool more; do { more = uv_run(env->event_loop(), UV_RUN_ONCE);