Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Plugin conflict tool to assist with debugging mods. #64

Open
devdave opened this issue Feb 12, 2023 · 6 comments
Open

Comments

@devdave
Copy link

devdave commented Feb 12, 2023

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:

  1. 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?

@ManlyMarco
Copy link
Member

ManlyMarco commented Feb 12, 2023

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),

@devdave
Copy link
Author

devdave commented Feb 16, 2023

@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?

@devdave
Copy link
Author

devdave commented Feb 16, 2023

@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.

@ManlyMarco
Copy link
Member

[Harmony.Logger]
LogChannels = Info, Warn, Error, Debug

@devdave
Copy link
Author

devdave commented Feb 17, 2023

@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.

@ManlyMarco
Copy link
Member

I left out IL level to reduce log spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants