private static void GetPreDebuggingKey(out ConsoleKeyInfo keyPressed) { do { keyPressed = Console.ReadKey(); } while (!keyPressed.IsValidPreDebuggingKey()); }