HarmonyX
HarmonyX copied to clipboard
[Feature request] Plugin conflict tool to assist with debugging mods.
I am not a mod developer but more a debugger/murder mystery detective figuring out what 2 or more mods are fighting over the same resource. I kind of understand the gist of what BepinEx and Harmony do so it makes me wonder if:
- There is some sort of dictionary/map of all plugin classes and the methods they hook or transpile.
2, If not could such a registry exist where the registry was something like a dictionary where the key was the ${patched class}::${method name} -> list of string's like ${plugin guid}::${PatchType} to help zero in on hot spots.
If you can point me in the general direction where the plugins are loaded (or is that BepinEx?) I could fork the code base and try to make a patch where something, perhaps a Singleton, builds the registry suggested above and then prints outs keyed lists with 2 or more elements. There might be a problem with HarmonyPatchType.all patches but something is better than nothing, right?
If all you want is see what gets patched for debugging, you can just set harmony logging level to debug (BepInEx has a config entry for it, or add HarmonyDebug attributes to your patches if you only want to debug a single patch/affected method),
@ManlyMarco I set the player.log to all but it didn't show what was getting patched unfortunately. I am using BepInEx 5.4.19.0 is there a newer version with the extra verbose logging?
@ManlyMarco This is the direction I was thinking https://github.com/Digitalroot-Valheim/Digitalroot.Valheim.PluginInfo but able to provide more/specific insight to make it easier for users and mod devs to debug issues.
[Harmony.Logger] LogChannels = Info, Warn, Error, Debug
@ManlyMarco Isn't ALL (or is it all) the equivalent of having all levels flipped on?
I attempted to upgrade to the latest BepinEx release but as a separate issue it didn't seem to hook/work. The BepinEx logs were touched so I am not sure what the problem was.,
My server's player community is now using git to keep synced (individual licenses are pending) but the repo is here https://github.com/devdave/Valheim-shenanigans - when I get time I will make an upgrade branch and try again to see if I can isolate the upgrade issue.
I left out IL level to reduce log spam.