void StartNodeDebugger(string args)
{
proc = new Process ();
proc.StartInfo.FileName = node_path;
proc.StartInfo.Arguments = args;
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.RedirectStandardInput = true;
proc.StartInfo.RedirectStandardOutput = true;
proc.StartInfo.RedirectStandardError = true;
proc.StartInfo.EnvironmentVariables ["NODE_DISABLE_COLORS"] = "1";
//proc.OutputDataReceived += (sender, e) => ProcessOutput (e.Data);
proc.ErrorDataReceived += (sender, e) => ProcessError (e.Data);
lock (nodeLock) {
proc.Start ();
sin = proc.StandardInput;
proc.BeginOutputReadLine ();
proc.BeginErrorReadLine ();
if (!bootstrap_lock.Wait (8000))
throw new InvalidOperationException ("Debugger did not start");
if (logNode)
LogWriter (false, "connected to node debugger");
}
debugger = new V8DebuggerProtocolClient ();
debugger.Break += HandleBreak;
debugger.UncaughtException += HandleUncaughtException;
debugger.Start ();
}