BepInEx MonoMod Debug Patcher

v1.1.1·Updated 2025-04-03

Makes exception easier to debug

About this mod Author’s original text

BepInExMonoModDebug

Makes exception easier to debug

What it does

By installing this mod, your exception will now show IL offset, even if some mod patched the method.

Before:

[Error: Unity Log] IndexOutOfRangeException: Index was outside the bounds of the array.

Stack trace:

(wrapper dynamic-method) HUDManager.DMD(HUDManager,string,int)...

After:

[Error: Unity Log] IndexOutOfRangeException: Index was outside the bounds of the array.

Stack trace:

HUDManager.AddPlayerChatMessageClientRpc (System.String chatMessage, System.Int32 playerId) (at:IL_012E)...

Caution

Currently some mods may to break if they using Transpiler wrong, e.g. returning invalid instructions.

For developers

For debugging further, you will need to dump all patches by enabling [Dumps] Save in BepInExMonoModDebugPatcher.cfg. After running, the directory BepInEx/dumps will contain all patched assemblies.

Links

Install & use Install: BepInEx plugin

  1. The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
  2. Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
  3. Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
  4. Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.

Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file.

Dependencies

Install these first, or the mod will not work:

BepInEx-BepInExPack

File & checksum

Filename
BepInEx_MonoMod_Debug_Patcher-1.1.1.zip
File size
19.6 KiB