Pages

Monday, November 10, 2014

How to write debug info onto console in MVC in visual studio



I wanted to debug a piece of code which was not working in my MVC site .To write debug statements onto output window,Simply add the following code

System.Diagnostics.Debug.WriteLine("Test statement");
 
Later start the  website using Debug mode - and check for the statements in the Output tab in Visual Studio
This is what I do for a lot of MVC 3,4,5 applications and it works perfectly.

No comments:

Post a Comment