BepInEx MonoMod Debug Patcher
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
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- 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.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- 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.
Install these first, or the mod will not work: