You are viewing a potentially older version of this package. View all versions.
DiFFoZ-BepInEx_MonoMod_Debug_Patcher-1.1.0 icon

BepInEx MonoMod Debug Patcher

Makes exception easier to debug

Date uploaded 3 months ago
Version 1.1.0
Download link DiFFoZ-BepInEx_MonoMod_Debug_Patcher-1.1.0.zip
Downloads 42491
Dependency string DiFFoZ-BepInEx_MonoMod_Debug_Patcher-1.1.0

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2100 icon
BepInEx-BepInExPack

BepInEx pack for Mono Unity games. Preconfigured and ready to use.

Preferred version: 5.4.2100

README

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::AddPlayerChatMessageClientRpc>(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 <af9b1eec498a45aebd42601d6ab85015>: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

https://thunderstore.io/c/lethal-company/p/DiFFoZ/BepInEx_MonoMod_Debug_Patcher/

CHANGELOG

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[1.1.0] 2024-08-16

Changed

  • Moved generation of method from Cecil to MethodBuilder for potential performance improvement.

Removed

  • Patch of Unity StackTraceUtilities because it's not needed.

[1.0.2] 2024-04-10

Changed

  • Patch of StackFrame.AddFrames to make it compatible with other mods (like LethalLib).

Fixed

  • MonoMod patches was breaking IL offset.

[1.0.1] 2024-04-06

Changed

  • Wrap patching with try/catch if some mod already patching the same method.

[1.0.0] 2024-04-06

Added

  • IL offset printing on exception.

Changed

  • Dumping patches to make them really fast.

[0.0.3] 2024-03-21

Fixed

  • Exception that thrown if Dump.Save was disabled

[0.0.2] 2024-03-21

Changed

[0.0.1] 2024-03-21

Added

  • Project files