How to show print debug messages to console

Hello jucers,

It may be a pretty novice question but I couldn’t figure how to do.

I would like to print debug messages to console, instead of displaying DialogWindows. How do I print console messages with std::cout? I am using Visual Studio 2015 but there is not output message when I use std::cout.

Any ideas?

That’s actually how I do it, and it works for me. There are two windows though, where it could end up, and I don’t know, how to select which one, but I didn’t bother, as long as I find it:
One is the “Output” window in the debug section, the other one is the “Immediate Window” (or similar, my windows machine is at work…)
You can also use the DBG(); macro from juce, which will only print in debug builds, or will even redirect into a FileLogger instance.
If you can’t find the debug output anywhere in VisualStudio, you can always run your program in cmd.exe. That even works running the host from CMD.exe and see debug output from your plugin.

There is also a google finding with a lot of background info of VisualStudios output options.

2 Likes