public void AllSteps(int index, bool eachExecution) { bool isStopped = false; ProgramState ps = repo.GetProgramState(index); Console.WriteLine(ps.Tostring()); ExecutionStack executionStack = ps.GetExecutionStack(); while (!executionStack.IsEmpty()) { try { OneStep(ps, executionStack, eachExecution); repo.SaveLog(ps); } catch (CustomException exc) { Console.WriteLine(exc.Message); isStopped = true; break; } } if (!eachExecution && !isStopped) { Console.WriteLine(ps.Tostring()); } ps.Reload(); }