public void Start()
            {
                process.Start();
                process.BeginOutputReadLine();
                process.BeginErrorReadLine();

                if (debug)
                {
                    var maxWaitUntil = DateTime.Now.AddSeconds(30);
                    System.Threading.Thread.Sleep(100);
                    while (shouldAttachToMain == null && maxWaitUntil > DateTime.Now)
                    {
                        System.Threading.Thread.Sleep(100);
                    }
                    if (shouldAttachToMain != null && shouldAttachToMain.Value)
                    {
                        AttachToProcess(process.Id);
                    }
                }
            }