Skip to content

Add support for unreal's additional crash context scopes #1052

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

redxdev
Copy link

@redxdev redxdev commented Aug 14, 2025

Requires Epic to accept https://github.com/EpicGames/UnrealEngine/pull/13686 first as one required method is not exported from Core.

Unreal has a little-known macro UE_ADD_CRASH_CONTEXT_SCOPE which allows running code to add additional information to a crash if the crash happens within the scope the macro is in. This adds support to sentry to retrieve this information and add it as an additional scope. Some other systems may also add data into this via OnAdditionalCrashContextDelegate().

@redxdev redxdev requested a review from tustanivsky as a code owner August 14, 2025 18:23
@@ -9,6 +9,52 @@

#include "GenericPlatform/GenericPlatformSentryScope.h"

#if WITH_ADDITIONAL_CRASH_CONTEXTS
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add that this block will probably need an && UE_VERSION_5_7_OR_GREATER or whatever the macro is, which I'll add if/when Epic accepts their side of the PR.

@tustanivsky
Copy link
Collaborator

Hey @redxdev, thank you for submitting this PR! We'll be looking forward to Epics accepting you're changes to the engine and also explore if there's more context data we can add like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants