Display a message in Visual Studio's output window when not debug mode?

后端 未结 6 1972
耶瑟儿~
耶瑟儿~ 2021-01-31 13:50

In Java, you can use System.out.println(message) to print a message to the output window.

What\'s the equivalent in Visual Studio ?

I know when I\'m

6条回答
  •  情话喂你
    2021-01-31 14:14

    For me this was the fact that debug.writeline shows in the Immediate window, not the Output. My installation of VS2013 by default doesn't even show an option to open the Immediate window, so you have to do the following:

    Select Tools -> Customize 
    Commands Tab
    View | Other Windows menu bar dropdown
    Add Command...
    The Immediate option is in the Debug section.
    

    Once you have Ok'd that, you can go to View -> Other Windows and select the Immediate Window and hey presto all of the debug output can be seen.

    Unfortunately for me it also showed about 50 errors that I wasn't aware of in my project... maybe I'll just turn it off again :-)

提交回复
热议问题