From cc5664156a6db3c474b01bff49188aa66c4e8811 Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Thu, 16 Jan 2025 01:05:11 +0200 Subject: [PATCH] Remove the redundant section about debug files from CRC (#12258) --- .../unreal/configuration/setup-crashreporter/index.mdx | 9 +-------- public/_platforms/unreal.json | 2 +- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/docs/platforms/unreal/configuration/setup-crashreporter/index.mdx b/docs/platforms/unreal/configuration/setup-crashreporter/index.mdx index b46deae0c5445c..a974c9912e91b4 100644 --- a/docs/platforms/unreal/configuration/setup-crashreporter/index.mdx +++ b/docs/platforms/unreal/configuration/setup-crashreporter/index.mdx @@ -41,16 +41,9 @@ The simplest way is to search the option: `Crash Reporter`: The option is located under _Project > Packaging_ menu, then select _show advanced_ followed by checking the box for: `Include Crash Reporter`. -## Debug Information - -To get the most out of captured crash reports [debug symbols](#upload-debug-symbols) need to be uploaded to Sentry. -In order for Sentry to be able to process the crash report and translate -memory addresses to meaningful information like function names, module names -and line numbers, the crash itself must be associated with the corresponding debug information first. - ## Configure the Crash Reporter Endpoint -Now that the _Crash Reporter_ and _Debug Files_ are included, UE needs to know where to send the +Now that the _Crash Reporter_ is included, UE needs to know where to send the crash. For that, we need to add the Sentry _Unreal Engine Endpoint_ from the _Client Keys_ settings page to the game's configuration file. This will include whichever project within Sentry you want to see real-time crashes for. That's accomplished by configuring the `CrashReportClient` in the _DefaultEngine.ini_ file. You'll need to change the engine to do this to work. Edit the file: diff --git a/public/_platforms/unreal.json b/public/_platforms/unreal.json index 6f9816bf0f201f..31334ddea80ce9 100644 --- a/public/_platforms/unreal.json +++ b/public/_platforms/unreal.json @@ -1 +1 @@ -{"key":"unreal","type":"framework","doc_link":"https://docs.sentry.io/platforms/unreal/","name":"Unreal Engine","aliases":[],"categories":["mobile","desktop","console","gaming"],"body":"

Installation

\n

Download the latest plugin sources from the Releases page and place it in the

projectRepresents your service in Sentry and allows you to scope events to a distinct application.
's \"Plugins\" directory or install the plugin from the UE Marketplace page via the Epic Games Launcher.

\n
\n

The Releases page provides two plugin packages: github and marketplace. We recommend using the github version which uses Crashpad, an out-of-proc handler that sends the crash report right away. The marketplace version relies on Breakpad, an in-proc handler which requires the UE application or game to be relaunched in order to send the crash reports to Sentry.

\n
\n

In the editor navigate to the Project Settings > Plugins > Code Plugins menu and check whether the Sentry plugin is enabled.

\n

To access the plugin API from within C++, add Sentry support to the build script (MyProject.build.cs):

\n
PublicDependencyModuleNames.AddRange(new string[] { ..., \"Sentry\" });
\n

Configuration

\n

Access the Sentry configuration window by going to editor's menu: Project Settings > Plugins > Sentry and enter the following

DSNThe Data Source Name (DSN) key tells the Sentry SDK where to send events, ensuring they go to the right project.
:

\n
___PUBLIC_DSN___
\n

Crash Reporter Client

\n

In Unreal Engine versions prior to UE 5.2 to automatically capture errors on desktop platforms Crash Reporter Client has to be configured.

\n

Include the Unreal Engine Crash Reporter

\n

You can add the crash reporter client to your game in Project Settings.

\n

The option is located under Project > Packaging; select \"show advanced\" followed by\nchecking the box for \"Include Crash Reporter\".

\n

Debug Information

\n

To get the most out of Sentry, crash reports must include debug information.\nIn order for Sentry to be able to process the crash report and translate\nmemory addresses to meaningful information like function names, module names,\nand line numbers, the crash itself must include debug information. In addition, symbols need\nto be uploaded to Sentry.

\n

The option is also located under Project > Packaging; select \"show advanced\" followed by\nchecking the box for \"Include Debug Files\".

\n

Configure the Crash Reporter Endpoint

\n

Now that the crash reporter and debug files are included, UE4 needs to know where to send the\ncrash. For that, add the Sentry \"Unreal Engine Endpoint\" from the \"Client Keys\" settings page to the game's configuration file. This will\ninclude which

projectRepresents your service in Sentry and allows you to scope events to a distinct application.
in Sentry you want to see crashes displayed in.\nThat's accomplished by configuring the CrashReportClient in the DefaultEngine.ini file. Changing the engine is necessary for this to work.

\n

Edit the file:

\n
\n

engine-dir\\Engine\\Programs\\CrashReportClient\\Config\\DefaultEngine.ini

\n
\n

Add the configuration section:

\n
[CrashReportClient]\nCrashReportClientVersion=1.0\nDataRouterUrl=\"___UNREAL_URL___\"
\n

If a [CrashReportClient] section already exists, simply changing the value of DataRouterUrl\nis enough.

\n

Upload Debug Symbols

\n

To allow Sentry to fully process native crashes and provide you with\nsymbolicated stack traces, you need to upload debug information files\n(sometimes also referred to as debug symbols or just symbols). We recommend\nuploading debug information during your build or release process.

\n

For all libraries where you'd like to receive symbolication, you need\nto provide debug information. This includes dependencies and operating system\nlibraries.

\n

In addition to debug information files, Sentry needs call frame information\n(CFI) to extract accurate stack traces from minidumps of optimized release\nbuilds. CFI is usually part of the executables and not copied to debug symbols.\nUnless you are uploading Breakpad symbols, be sure to also include the binaries\nwhen uploading files to Sentry.

\n

For more information on uploading debug information and their supported formats,\ncheck out our Debug Information Files documentation.

\n

Verify

\n

Once everything is configured you can call the plugin API from both C++ and blueprints:

\n
#include \"SentrySubsystem.h\"\n\nvoid Verify()\n{\n    // Capture message\n    USentrySubsystem* SentrySubsystem = GEngine->GetEngineSubsystem<USentrySubsystem>();\n    SentrySubsystem->CaptureMessage(TEXT(\"Capture message\"));\n}
"} \ No newline at end of file +{"key":"unreal","type":"framework","doc_link":"https://docs.sentry.io/platforms/unreal/","name":"Unreal Engine","aliases":[],"categories":["mobile","desktop","console","gaming"],"body":"

Installation

\n

Download the latest plugin sources from the Releases page and place it in the

projectRepresents your service in Sentry and allows you to scope events to a distinct application.
's \"Plugins\" directory or install the plugin from the UE Marketplace page via the Epic Games Launcher.

\n
\n

The Releases page provides two plugin packages: github and marketplace. We recommend using the github version which uses Crashpad, an out-of-proc handler that sends the crash report right away. The marketplace version relies on Breakpad, an in-proc handler which requires the UE application or game to be relaunched in order to send the crash reports to Sentry.

\n
\n

In the editor navigate to the Project Settings > Plugins > Code Plugins menu and check whether the Sentry plugin is enabled.

\n

To access the plugin API from within C++, add Sentry support to the build script (MyProject.build.cs):

\n
PublicDependencyModuleNames.AddRange(new string[] { ..., \"Sentry\" });
\n

Configuration

\n

Access the Sentry configuration window by going to editor's menu: Project Settings > Plugins > Sentry and enter the following

DSNThe Data Source Name (DSN) key tells the Sentry SDK where to send events, ensuring they go to the right project.
:

\n
___PUBLIC_DSN___
\n

Crash Reporter Client

\n

In Unreal Engine versions prior to UE 5.2 to automatically capture errors on desktop platforms Crash Reporter Client has to be configured.

\n

Include the Unreal Engine Crash Reporter

\n

You can add the crash reporter client to your game in Project Settings.

\n

The option is located under Project > Packaging; select \"show advanced\" followed by\nchecking the box for \"Include Crash Reporter\".

\n

Configure the Crash Reporter Endpoint

\n

Now that the crash reporter is included, UE4 needs to know where to send the\ncrash. For that, add the Sentry \"Unreal Engine Endpoint\" from the \"Client Keys\" settings page to the game's configuration file. This will\ninclude which

projectRepresents your service in Sentry and allows you to scope events to a distinct application.
in Sentry you want to see crashes displayed in.\nThat's accomplished by configuring the CrashReportClient in the DefaultEngine.ini file. Changing the engine is necessary for this to work.

\n

Edit the file:

\n
\n

engine-dir\\Engine\\Programs\\CrashReportClient\\Config\\DefaultEngine.ini

\n
\n

Add the configuration section:

\n
[CrashReportClient]\nCrashReportClientVersion=1.0\nDataRouterUrl=\"___UNREAL_URL___\"
\n

If a [CrashReportClient] section already exists, simply changing the value of DataRouterUrl\nis enough.

\n

Upload Debug Symbols

\n

To allow Sentry to fully process native crashes and provide you with\nsymbolicated stack traces, you need to upload debug information files\n(sometimes also referred to as debug symbols or just symbols). We recommend\nuploading debug information during your build or release process.

\n

For all libraries where you'd like to receive symbolication, you need\nto provide debug information. This includes dependencies and operating system\nlibraries.

\n

In addition to debug information files, Sentry needs call frame information\n(CFI) to extract accurate stack traces from minidumps of optimized release\nbuilds. CFI is usually part of the executables and not copied to debug symbols.\nUnless you are uploading Breakpad symbols, be sure to also include the binaries\nwhen uploading files to Sentry.

\n

For more information on uploading debug information and their supported formats,\ncheck out our Debug Information Files documentation.

\n

Verify

\n

Once everything is configured you can call the plugin API from both C++ and blueprints:

\n
#include \"SentrySubsystem.h\"\n\nvoid Verify()\n{\n    // Capture message\n    USentrySubsystem* SentrySubsystem = GEngine->GetEngineSubsystem<USentrySubsystem>();\n    SentrySubsystem->CaptureMessage(TEXT(\"Capture message\"));\n}
"}