Also enable the debugger

This commit is contained in:
Cheng Zhao 2015-04-20 14:10:15 +08:00
parent ee08d98d2e
commit 7a52a4cff1

View file

@ -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);