Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I see cout output in a non-console application?

It seems rather tedious to output to debug window. Where can I find cout output if I am writing a non-console information ?

Like:

double i = a / b; cout << b << endl;//I want to check out whether b is zero. It seems the output cannot be found anywhere. 
like image 981
CDT Avatar asked May 23 '13 00:05

CDT


People also ask

How do I display the output window or console in Visual Studio?

in the "Ouput Window". you can usually do CTRL-ALT-O to make it visible.

How do I view console output in Visual Studio 2019?

In Visual Studio choose VIEW > OUTPUT. You will see the results above in this output window after changing two settings below.


1 Answers

The question is very clear. How use std::cout to debug a non-console application in Visual Studio.

The answer is very clear: you cannot. That is, Visual Studio does not support std::cout as debug tool for non-console applications.

This is a serious limitation of Visual Studio, probably a failure to meet the C++ standard even. I find it very sad to see disinformative "answers" here trying to hide this defect of their precious Visual Studio.

like image 88
Marius Amado-Alves Avatar answered Oct 22 '22 19:10

Marius Amado-Alves