Skip to content

Commit b129063

Browse files
committed
[Sentry] Disable reporting on debug builds
Reduce headache on my end to remove debug releases from dashboard
1 parent 85d7c3f commit b129063

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

Hi3Helper.Core/Classes/SentryHelper/SentryHelper.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,11 @@ public static bool IsEnabled
117117

118118
public static void InitializeSentrySdk()
119119
{
120+
#if DEBUG
121+
_isEnabled = false;
122+
return;
123+
#pragma warning disable CS0162 // Unreachable code detected
124+
#endif
120125
_sentryInstance =
121126
SentrySdk.Init(o =>
122127
{
@@ -164,6 +169,9 @@ public static void InitializeSentrySdk()
164169
IpAddress = null
165170
};
166171
});
172+
#if DEBUG
173+
#pragma warning restore CS0162 // Unreachable code detected
174+
#endif
167175
}
168176

169177
/// <summary>

0 commit comments

Comments
 (0)