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.
in the "Ouput Window". you can usually do CTRL-ALT-O to make it visible.
In Visual Studio choose VIEW > OUTPUT. You will see the results above in this output window after changing two settings below.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With