From a45860fd662f4b0f6c10bf102ebf6c0aac5127f3 Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Tue, 4 Jun 2013 17:12:46 -0700 Subject: MAINT-2740 put debug output back with guard of debugger presence per Nat review suggestion --- indra/llcommon/llerror.cpp | 7 ++++--- indra/llcommon/llerror.h | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp index c2daa6902f..37ba097832 100755 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -1399,18 +1399,19 @@ namespace LLError sIndex = 0 ; } -#if LL_WINDOWS && !defined(LL_RELEASE_FOR_DOWNLOAD) +#if LL_WINDOWS void LLOutputDebugUTF8(const std::string& s) { // Be careful not to enable this in non-debug builds as there are bad interactions between the // exceptions thrown by this function and the handling of stacks in coroutine fibers. BUG-2707 // - #if defined(_DEBUG) + if (IsDebuggerPresent()) + { // Need UTF16 for Unicode OutputDebugString // OutputDebugString(utf8str_to_utf16str(s).c_str()); OutputDebugString(TEXT("\n")); - #endif + } } #endif diff --git a/indra/llcommon/llerror.h b/indra/llcommon/llerror.h index bf8f488aba..a2a6993330 100755 --- a/indra/llcommon/llerror.h +++ b/indra/llcommon/llerror.h @@ -199,13 +199,13 @@ namespace LLError static void end(std::ostringstream* _out) ; }; -#if LL_WINDOWS && !defined(LL_RELEASE_FOR_DOWNLOAD) +#if LL_WINDOWS void LLOutputDebugUTF8(const std::string& s); #endif } -#if LL_WINDOWS && !defined(LL_RELEASE_FOR_DOWNLOAD) +#if LL_WINDOWS // Macro accepting a wchar_t* for display in windows debugging console in debug builds only // (wchar_t flavor chosen for maximal utility with unicode text debugging) // -- cgit v1.2.3