捕捉Release模式的Win32程序输出的调试信息,请选中“Capture Global Win32”选项.
可以远程捕获!
// Test_Console.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include <Windows.h>
#include <atlstr.h>
#define DEBUG_VIEW
int main()
{
int cnt = 0;
while (1) {
#ifdef DEBUG_VIEW
CString str;
str.Format(_T("Module: %d\r\n"),cnt++);
//sprintf_s(buf,"%d\n",cnt);
//TRACE(_T("Module: %d\r\n"), cnt);
OutputDebugString(str);
Sleep(100);
#endif
}
return 0;
}
设定DebugView的Filter(Edit-Filter):
string: Module