diff --git a/source/Sekai/RuntimeInfo.cs b/source/Sekai/RuntimeInfo.cs
index 1701467..35ed1b2 100644
--- a/source/Sekai/RuntimeInfo.cs
+++ b/source/Sekai/RuntimeInfo.cs
@@ -2,6 +2,9 @@
// Licensed under MIT. See LICENSE for details.
using System;
+using System.Diagnostics;
+using System.Linq;
+using System.Reflection;
using System.Runtime.Versioning;
namespace Sekai;
@@ -14,13 +17,7 @@ public static class RuntimeInfo
///
/// Whether execution is currently in debug mode.
///
- public static readonly bool IsDebug =
-#if DEBUG
- true
-#else
- false
-#endif
- ;
+ public static readonly bool IsDebug;
///
/// Gets the operating system currently in execution.
@@ -110,6 +107,8 @@ static RuntimeInfo()
if (OperatingSystem.IsIOS())
OS = Platform.iOS;
+
+ IsDebug = Assembly.GetEntryAssembly()!.GetCustomAttributes().Any(a => a.IsJITTrackingEnabled);
}
///