How to display standard output in Visual Studio 2015?

Most of the IDEs I've seen (NetBeans, QtCreator, XCode, CodeBlocks, Eclipse) provide a ready-made method for viewing standard output either in one of the built-in windows or in an external console or in Visual Studio's BUT log.

I really do not want to allocate a separate console, as suggested in IT . I would also prefer not to redirect it to a file, as suggested in the IT question (the output file is not created using the proposed console command ( 2>output.txt )). Please do not give answers that change the code base , for example, using OutputDebugString .

If displaying standard output inside VS is not possible, a working solution to two other alternatives would be welcome, namely the use of an external console (which I tried to use without seeing the output in it) or a log file.

+5
source share
1 answer

If this is for debugging purposes only, you can find "Debug breakpoints / trace actions . " They allow you to record custom lines with expressions (for example, variables) in the visual studio console.

For an application that is not a console window, by default (i.e., without changing your code base upon request), all output to stdout is lost.

+1
source

Source: https://habr.com/ru/post/1240565/


All Articles