Add logging native exception stack trace on Windows when debugger is attached before going back to the crash location

This commit is contained in:
Wojciech Figat
2023-01-03 15:58:02 +01:00
parent e596d48729
commit 06b2bf0094

View File

@@ -305,9 +305,12 @@ LONG CALLBACK SehExceptionHandler(EXCEPTION_POINTERS* ep)
errorMsg += String::Format(TEXT("{:#x}"), (uint32)ep->ExceptionRecord->ExceptionCode);
}
// Pause if debugging
// Log exception and return to the crash location when using debugger
if (Platform::IsDebuggerPresent())
{
{
LOG_STR(Error, errorMsg);
const String stackTrace = Platform::GetStackTrace(0, 60, ep);
LOG_STR(Error, stackTrace);
return EXCEPTION_CONTINUE_SEARCH;
}