How to use Console.WriteLine in ASP.NET (C#) during debug?

后端 未结 7 2265
说谎
说谎 2020-12-22 21:40

I want to write some result to the console in ASP.NET (C#). It works in a Window application, but a Web application does not work. Here is what I have tried:



        
7条回答
  •  我在风中等你
    2020-12-22 22:13

    using System.Diagnostics;

    The following will print to your output as long as the dropdown is set to 'Debug' as shown below.

    Debug.WriteLine("Hello, world!");


    enter image description here

提交回复
热议问题