VisualStudio: no debug output

后端 未结 12 973
有刺的猬
有刺的猬 2020-12-24 03:13

I\'m trying to debug a C# application. The method:

System.Diagnostics.Debug.WriteLine(\"something\");

should do the work, but in the Output

12条回答
  •  [愿得一人]
    2020-12-24 03:47

    I just ran into this issue with Visual Studio 2010 and 2017 and this is what I did to get it to work and I have no explanation as to why it now works.

    What I did to get it work. I created a new Windows Form project and added a button which when pressed executed Console.WriteLine("Test"). I saw "Test" in the Output Window. I then loaded my real project and added a button to execute Console.WriteLine("Test") and now it produced output. Further Console.WriteLine statements worked from then on.

提交回复
热议问题