Browse Source

--log-std now logs to debugging Visual Studio's output pane while editor is running

(cherry picked from commit 56828bc7c187fe401e6392eec0454c04876a0300)

(cherry picked from commit 56828bc7c187fe401e6392eec0454c04876a0300)
Matt Benic 10 years ago
parent
commit
7271cbe0ac
1 changed files with 4 additions and 0 deletions
  1. 4 0
      Source/Atomic/Core/ProcessUtils.cpp

+ 4 - 0
Source/Atomic/Core/ProcessUtils.cpp

@@ -179,6 +179,10 @@ void PrintUnicode(const String& str, bool error)
         WString strW(str);
         DWORD charsWritten;
         WriteConsoleW(stream, strW.CString(), strW.Length(), &charsWritten, 0);
+        if (IsDebuggerPresent())
+        {
+            OutputDebugString(str.CString());
+        }
     }
 #else
     fprintf(error ? stderr : stdout, "%s", str.CString());