I'm trying to see the output of a foreach loop in my code in the output window in an ASP.NET web app, but I don't get any results even though there is valid data. I've done a fair amount searching using Google with this issue, but nothing I've done works. Here is the code in my ASPX page:
List<MyClass> myClasses = GetMyClasses();
foreach (MyClass myClass in myClasses)
{
Debug.WriteLine(myClass.SomeProperty);
}
The code is very straight-forward. When I debug this page, myClass.SomeProperty has the value I want, but nothing is getting printed to the output window. What could I be missing? I cannot use a Response.Write because my Response stream is being used to create an Excel file. I also don't want to use Tracing.
Update
I have this in my web.config file:
<system.web>
...
<compilation debug="true" targetFramework="4.0">
...
</system.web>