Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to display standard output in Visual Studio 2015?

Most IDE's I've seen (NetBeans, QtCreator, XCode, CodeBlocks, Eclipse) provide an out-of-the-box method to view standard output either in one of its embedded window or external console or in a log BUT Visual Studio.

I really don't want to allocate a separate console as it is suggested at THIS question. I'd also prefer not to redirect it to a file as it is suggested at THIS question (output file is not created with the suggested console command (2>output.txt)). Please don't give answers that modify the codebase like using OutputDebugString.

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

like image 526
MatrixAndrew Avatar asked Nov 09 '22 22:11

MatrixAndrew


1 Answers

If it is only for debugging purposes, you might find Debug Breakpoints/Tracepoint actions helpful. They enable to log custom strings with expressions (i.e. variables) to the visual studio console.

For a non-console windows application, by default (i.e. without changing your codebase, as you are requesting) all output to stdout is lost..

like image 120
Jack White Avatar answered Nov 14 '22 23:11

Jack White