According of my attempt, windbg
could not accomplish this task. dbgview
is one of alternative.
dbgview
is not included to common SDK or Devtools. Can download from: https://technet.microsoft.com/en-us/sysinternals/bb896647.aspx
To use, run dbgview.exe
and configure its filter, finally run debug target application. For modern Windows, must run dbgview.exe
as Administrator, otherwise cannot receive debug messages from common applications.
Note that OutputDebugMessage
(https://msdn.microsoft.com/en-us/library/windows/desktop/aa363362(v=vs.85).aspx) seems to work fine without debug configuration. (/Zi
, /DEBUG
)
So, should do like this for release build:
#ifdef DEBUG
OutputDebugMessage(L"debug message")
#endif