Add step debug mode and refactor command handling for run/debug

This commit is contained in:
Stone_Red
2026-03-04 16:01:23 +01:00
parent e99df1e3f2
commit 7f58fb4aaf
2 changed files with 85 additions and 28 deletions
+10 -1
View File
@@ -20,6 +20,7 @@ internal class TextEditor
public Point CursorPosition { get; } = new(0, 0);
public Mode EditMode { get; set; } = Mode.Command;
public string CurrentPath { get; set; } = string.Empty;
public bool IsStepDebugMode { get; set; }
public TextEditor(string path) : this()
{
@@ -241,6 +242,14 @@ internal class TextEditor
{
Console.Write(output);
}
if (IsStepDebugMode && e is not null && !e.IsTask)
{
Console.ForegroundColor = ConsoleColor.DarkGray;
Console.WriteLine("[Step] Press any key for next line (Ctrl+C to stop)...");
Console.ForegroundColor = ConsoleColor.Gray;
_ = Console.ReadKey(true);
}
}
}
@@ -279,4 +288,4 @@ internal enum Mode
Edit,
Command,
Debug
}
}