Getting Debug Output From Scripts on ASPX Pages

Posted: May 18th, 2010 | Author: | Filed under: .Net, Debugging, Scripting, Visual Studio | Tags: , , , , , | No Comments »

To get some useful output when debugging C# or VB scripts on aspx
pages use the following statement in the script:

System.Diagnostics.Debug.WriteLine("We are here!");

In Visual Studio, attach the debugger to the process serving the
page containing the script (typically an IIS server process).
The debug text, “We are here!”, now appears in the output window
whenever the aforementioned statement in the script is executed!