Plain old console output is still a valuable debugging tool, even when used in a GUI application.
There are many tools here in CP that can be combined with console output like:
CConsole - a simple console for debug output[
^]
Creating a console for your MFC app's debug output[
^]
You can use printf, sprintf or any similar to build the output strings.