print to console in razor pages code example Example: mvc write to console Debug.WriteLine("My debug string here");