how to log to console using mvc razor within .net code example Example: mvc write to console Debug.WriteLine("My debug string here");