mirror of
https://github.com/Stone-Red-Code/YesNt-Interpreter.git
synced 2026-09-06 23:42:55 +02:00
Add step debug mode and refactor command handling for run/debug
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user