I would like to print some traces during the requests processing.
But when I make Console.WriteLine("something") in this environment, nothing is shown.
What is missing, what do I need to do in order to use console to print these traces?
Press F11 . Visual Studio calls the Console. WriteLine(String, Object, Object) method. The console window displays the formatted string.
You can use Debug. Writeline("debug information") . It will be displayed in the Output window.
Open Visual Studio, and choose Create a new project in the Start window. In the Create a new project window, select All languages, and then choose C# from the dropdown list. Choose Windows from the All platforms list, and choose Console from the All project types list.
In C# you can write or print to console using Console. WriteLine() or Console. Write(), basically both methods are used to print output of console.
Use Debug.Write()
and and watch the results come out through the debugger output window in the IDE.
Alternatively, use the ASP.NET trace feature, which is quite powerful. Once you have enabled tracing, you can navigate to the trace.axd page in your web app's root directory. This page will show the trace messages for your app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With