Being relatively new to ASP.NET, I took over a large project, and I want to debug my Global.asax.cs
using System.Diagnostics.Debug.WriteLine("foo");
or Console.WriteLine("bar");
. The strange thing is that I do not find the output foo
or bar
, I was expecting it in the Output window of my Visual Studio (Professional 2017) or in the F12-browser console, but there is nothing.
My code reads:
namespace API
{
public class WebApiApplication : System.Web.HttpApplication
{
protected void Application_Start()
{
// different stuff
System.Diagnostics.Debug.WriteLine("foo");
Console.WriteLine("bar");
}
}
}
Is there some configuration within Visual Studio I have to adjust? The strange thing is, that for other projects of the same solution, I do see output.
References
- Writing to output window of Visual Studio
- Where does Console.WriteLine go in ASP.NET? -- I tried quite a few things from this post, but it did not help
- Where does System.Diagnostics.Debug.Write output appear? - same here