I started a blank project in Visual Studio 2010 to write a C application. How can I send debug information to the Output window (menu Debug -> Windows -> Output )? Is there a relatively simple way to implement TRACE
or OutputDebugString
or something similar?
You can use OutputDebugString
from a VS C program.
#include <windows.h>
int _tmain(int argc, _TCHAR* argv[])
{
OutputDebugString(_T("Hello World\n"));
return 0;
}
The output will only be visible if you run with debugging (Debug > Start Debugging)
In the Output window, select "Debug" for "Show output from:"