public override void Run() { ProcessStartInfo processStartInfo = CreateProcessStartInfo(); if (Debug) { debugger.Start(processStartInfo); } else { PauseCommandPromptProcessStartInfo commandPrompt = new PauseCommandPromptProcessStartInfo(processStartInfo); debugger.StartWithoutDebugging(commandPrompt.ProcessStartInfo); } }
void StartDebugger(ProcessStartInfo startInfo) { LogCommandLine(startInfo); bool running = false; debugger.DebugStopped += DebugStopped; try { debugger.Start(startInfo); running = true; } finally { if (!running) { debugger.DebugStopped -= DebugStopped; } } }