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

前端 未结 12 825
醉话见心
醉话见心 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:32

    In the Visual Studio Options Dialog -> Debugging -> Check the "Redirect All Output Window Text to the Immediate Window". Then go to your project settings and change the type from "Console Application" to "Windows Application". At that point Visual Studio does not open up a console window anymore, and the output is redirected to the Output window in Visual Studio. However, you cannot do anything "creative", like requesting key or text input, or clearing the console - you'll get runtime exceptions.

提交回复
热议问题