Skip to content

Commit bc58745

Browse files
committed
build: DebugPatchers only exist in debug builds
1 parent 271a20e commit bc58745

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/UnityDebuggerAssistant/Patches/DebugPatch.cs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if DEBUG
12
using HarmonyLib;
23
using UnityDebuggerAssistant.Processing;
34

@@ -12,3 +13,4 @@ public static void Prefix()
1213
UDAPlugin.Log?.LogInfo("Debug Throw Prefix");
1314
}
1415
}
16+
#endif

src/UnityDebuggerAssistant/UDAPlugin.cs

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using BepInEx;
1+
using BepInEx;
22
using BepInEx.Logging;
33
using HarmonyLib;
44
using MonoMod.RuntimeDetour;
@@ -76,7 +76,11 @@ Unity Debugger assistant is loaded and receiving exceptions!
7676

7777
Harmony harmony = new(LCMPluginInfo.PLUGIN_GUID);
7878

79+
#if DEBUG
80+
//Debug patchers for testing
7981
harmony.PatchAll(typeof(DebugPatches));
82+
#endif
83+
8084
harmony.PatchAll(typeof(ExceptionConstructorPatch));
8185
//harmony.PatchAll(typeof(ExceptionStackGetterPatch));
8286

0 commit comments

Comments
 (0)