Having the output of a console application in Visual Studio instead of the console

前端 未结 12 850
醉话见心
醉话见心 2020-11-29 00:06

When doing a console application in Java with Eclipse, I see the output being put in a text box in the IDE itself, instead of having a console popping up like in Visual Stud

12条回答
  •  孤街浪徒
    2020-11-29 00:49

    If you need output from Console.WriteLine, and the Redirect All Output Window Text to the Immediate Window does not function and you need to know the output of Tests from the Integrated Test Explorer, using NUnit.Framework our problem is already solved at VS 2017:

    Example taken from C# In Depth by Jon Skeet: This produce this output at Text Explorer:

    When we click on Blue Output, under Elapsed Time, at right, and it produces this:

    Standard Output is our desired Output, produced by Console.WriteLine.

    It functions for Console and for Windows Form Applications at VS 2017, but only for Output generated for Test Explorer at Debug or Run; anyway, this is my main need of Console.WriteLine output.

提交回复
热议问题