node: start debugger for node run during a forked process

This commit is contained in:
Robo 2015-04-14 07:45:34 +05:30 committed by Cheng Zhao
parent 9cf4156928
commit ee08d98d2e

View file

@ -28,6 +28,10 @@ int NodeMain(int argc, char *argv[]) {
node::Environment* env = node::CreateEnvironment( node::Environment* env = node::CreateEnvironment(
gin_env.isolate(), gin_env.context(), argc, argv, exec_argc, exec_argv); gin_env.isolate(), gin_env.context(), argc, argv, exec_argc, exec_argv);
// Start debugger.
if (node::use_debug_agent)
node::StartDebug(env, node::debug_wait_connect);
bool more; bool more;
do { do {
more = uv_run(env->event_loop(), UV_RUN_ONCE); more = uv_run(env->event_loop(), UV_RUN_ONCE);