Gaslight Deceive Subvert
Gaslight Deceive Subvert

Reputation: 20372

Console output from web applications in Visual Studio

How do you debug web applications written in C# in Visual Studio? I'm using Console.WriteLine expecting the text to appear in the Output tab. Like it does when you develop console applications. But for web applications, the console output doesn't show up anywhere.

Upvotes: 20

Views: 27856

Answers (2)

freedeveloper
freedeveloper

Reputation: 4082

They are two form to write in Console Output for NET applications.

Debug.WriteLine()  // See [Microsoft Documentation][1]
Trace.WriteLine()  // See [Microsoft][2] documentation for more information

The difference between the two is that Debug only work when the program is in DEBUG mode. In the other hand TRACE works always. You can also set different levels of TRACE. See documentation for more information.

I hope that this information help you.

Upvotes: 2

spender
spender

Reputation: 120450

Debug.WriteLine

       

Upvotes: 26

Related Questions