-
-
Notifications
You must be signed in to change notification settings - Fork 55
feat: Added ANR options #1181
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
feat: Added ANR options #1181
Conversation
{ | ||
options.Debug = EditorGUILayout.BeginToggleGroup( | ||
new GUIContent("Enable Debug Output", "Whether the Sentry SDK should print its " + | ||
"diagnostic logs to the console."), | ||
options.Debug); | ||
|
||
options.DebugOnlyInEditor = EditorGUILayout.Toggle( | ||
new GUIContent("Only In Editor", "Only print logs when in the editor. Development " + | ||
"builds of the player will not include Sentry's SDK diagnostics."), | ||
options.DebugOnlyInEditor); | ||
|
||
options.DiagnosticLevel = (SentryLevel)EditorGUILayout.EnumPopup( | ||
new GUIContent("Verbosity Level", "The minimum level allowed to be printed to the console. " + | ||
"Log messages with a level below this level are dropped."), | ||
options.DiagnosticLevel); | ||
|
||
EditorGUILayout.EndToggleGroup(); | ||
} | ||
|
||
options.DiagnosticLevel = (SentryLevel)EditorGUILayout.EnumPopup( | ||
new GUIContent("Verbosity Level", "The minimum level allowed to be printed to the console. " + | ||
"Log messages with a level below this level are dropped."), | ||
options.DiagnosticLevel); | ||
EditorGUILayout.Space(); | ||
EditorGUI.DrawRect(EditorGUILayout.GetControlRect(false, 1), Color.gray); | ||
EditorGUILayout.Space(); | ||
|
||
EditorGUILayout.EndToggleGroup(); | ||
{ | ||
options.AutoSessionTracking = EditorGUILayout.BeginToggleGroup( | ||
new GUIContent("Auto Session Tracking", "Whether the SDK should start and end sessions " + | ||
"automatically. If the timeout is reached the old session will" + | ||
"be ended and a new one started."), | ||
options.AutoSessionTracking); | ||
|
||
options.AutoSessionTrackingInterval = EditorGUILayout.IntField( | ||
new GUIContent("Session Timeout [ms]", "The duration of time a session can stay paused " + | ||
"(i.e. the application has been put in the background) before " + | ||
"it is considered ended."), | ||
options.AutoSessionTrackingInterval); | ||
options.AutoSessionTrackingInterval = Mathf.Max(0, options.AutoSessionTrackingInterval); | ||
EditorGUILayout.EndToggleGroup(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please disregard. This is just an added indentation to help navigate this file.
|
{ | ||
options.IosNativeSupportEnabled = EditorGUILayout.Toggle( | ||
new GUIContent("iOS Native Support", "Whether to enable Native iOS support to capture" + | ||
"errors written in languages such as Objective-C, Swift, C and C++."), | ||
options.IosNativeSupportEnabled); | ||
|
||
options.AndroidNativeSupportEnabled = EditorGUILayout.Toggle( | ||
new GUIContent("Android Native Support", "Whether to enable Native Android support to " + | ||
"capture errors written in languages such as Java, Kotlin, C and C++."), | ||
options.AndroidNativeSupportEnabled); | ||
|
||
options.WindowsNativeSupportEnabled = EditorGUILayout.Toggle( | ||
new GUIContent("Windows Native Support", "Whether to enable native crashes support on Windows."), | ||
options.WindowsNativeSupportEnabled); | ||
|
||
options.MacosNativeSupportEnabled = EditorGUILayout.Toggle( | ||
new GUIContent("macOS Native Support", "Whether to enable native crashes support on macOS."), | ||
options.MacosNativeSupportEnabled); | ||
|
||
options.LinuxNativeSupportEnabled = EditorGUILayout.Toggle( | ||
new GUIContent("Linux Native Support", "Whether to enable native crashes support on Linux."), | ||
options.LinuxNativeSupportEnabled); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please disregard. This is just an added indentation to help navigate this file.
options.Il2CppLineNumberSupportEnabled = EditorGUILayout.Toggle( | ||
new GUIContent("IL2CPP line numbers", "Whether the SDK should try to to provide line " + | ||
"numbers for exceptions in IL2CPP builds."), | ||
options.Il2CppLineNumberSupportEnabled); | ||
|
||
if (options.Il2CppLineNumberSupportEnabled) | ||
{ | ||
EditorGUILayout.HelpBox("The IL2CPP line number support relies on the Debug Symbol Upload to be properly set up.", MessageType.Error); | ||
if (!SentryUnityVersion.IsNewerOrEqualThan("2020.3")) | ||
{ | ||
EditorGUILayout.HelpBox("The IL2CPP line number feature is supported from Unity version 2020.3 or newer and 2021.3 or newer onwards", MessageType.Warning); | ||
} | ||
else if (cliOptions is not null && !cliOptions.IsValid(null, EditorUserBuildSettings.development)) | ||
{ | ||
EditorGUILayout.HelpBox("The IL2CPP line number support relies on the Debug Symbol Upload to be properly set up.", MessageType.Error); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please disregard. This is just an added indentation to help navigate this file.
The ANR feature was missing an opt-out on the editor window. While at it I surfaced the timeout.