From 566e2db20223bc40ea4e09b529ed5db7b4a86906 Mon Sep 17 00:00:00 2001 From: Nick Bolton Date: Thu, 2 Aug 2018 19:19:06 +0100 Subject: [PATCH] #6383 Send core output to VS debug window when in foreground mode --- src/lib/platform/MSWindowsWatchdog.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/lib/platform/MSWindowsWatchdog.cpp b/src/lib/platform/MSWindowsWatchdog.cpp index d159040d..e97c2279 100644 --- a/src/lib/platform/MSWindowsWatchdog.cpp +++ b/src/lib/platform/MSWindowsWatchdog.cpp @@ -472,6 +472,16 @@ MSWindowsWatchdog::outputLoop(void*) if (m_fileLogOutputter != NULL) { m_fileLogOutputter->write(kINFO, buffer); } + +#if SYSAPI_WIN32 + if (m_foreground) { + // when in foreground mode (useful for debugging), send the core + // process output to the VS debug output window. + // we could use the MSWindowsDebugOutputter, but it's really fiddly to so, + // and there doesn't seem to be an advantage of doing that. + OutputDebugString(buffer); + } +#endif } } }