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

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

    Use System.Diagnostics.Trace

    Depending on what listeners you attach, trace output can go to the debug window, the console, a file, database, or all at once. The possibilities are literally endless, as implementing your own TraceListener is extremely simple.

提交回复
热议问题