Thursday, July 9, 2009

How I can debug C# file in asp.net ?

I have a simple aspx file and code behind in C#, but I don't understand how I can debug my code lines.





In JS I write "debugger" in code and thats it. How can it be done in C# ?

How I can debug C# file in asp.net ?
To Debug your C# ASP.Net web page, open your code behind file click on the line that you want to trace or start the debugging the code below it and press F9 on keyboard this will mark that line.


Now press F5 to Debug the code. Your Debugger will hang up at the code line where marked it. Now press F10 again and again to debug the code and trace the errors.
Reply:1- add this on the top





using System.Diagnostics;





2- then write out ur vars





Debug.WriteLine(UR_DEBUG_VAR);


No comments:

Post a Comment