diff options
author | Graham Madarasz <graham@lindenlab.com> | 2013-06-04 17:12:46 -0700 |
---|---|---|
committer | Graham Madarasz <graham@lindenlab.com> | 2013-06-04 17:12:46 -0700 |
commit | a45860fd662f4b0f6c10bf102ebf6c0aac5127f3 (patch) | |
tree | 1d33cd40afb8e979257e3c872c7d125bc18ce388 /indra/llcommon | |
parent | 0ce3d2e1cc9ae70bc7f6146ce38c5dcc1af4a3c6 (diff) |
MAINT-2740 put debug output back with guard of debugger presence per Nat review suggestion
Diffstat (limited to 'indra/llcommon')
-rwxr-xr-x | indra/llcommon/llerror.cpp | 7 | ||||
-rwxr-xr-x | indra/llcommon/llerror.h | 4 |
2 files changed, 6 insertions, 5 deletions
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) // |