Просмотр исходного кода

--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 лет назад
Родитель
Сommit
7271cbe0ac
1 измененных файлов с 4 добавлено и 0 удалено
  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());