Open korgano opened 1 year ago
Since we already use UnitDoorstop, you can just enable debugging in the doorstop_config.ini
by setting debug_enabled
to true
, no need to replace a mono dll.
Regarding the debug symbols patch, I myself haven't needed it, and I just tested the same harmonypatch `UnitDebug" uses on my install and it was only called once, so that doesn't sound useful:
AppDomain.Load Assembly=MonoMod.Utils.GetManagedSizeHelper, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null rawAssembly.Length=3072 rawSymbolStore.Length=
However, I could just move the debugging (+profiling) documentation to its own page and link it directly, to make it easier to find
https://github.com/BattletechModders/ModTek/blob/master/doc/DEVELOPMENT_GUIDE.md#debugging
UnityDebug is "UnityDoorstop implementation with Harmony patch that converts pdb to mdb allowing mono to read debug symbols."
This tool eliminates the need to swap out the game's
mono-2.0-bdwgc.dll
with a hard to obtain, potentially unstable DNSpy compatible copy, but is incompatible with ModTek. Attempting to run both at the same time results in ModTek failing to initialize and the game getting stuck in a loop as it tries to load modded saves.This would also simplify onboarding of new modders and ensure that DNSpy debugging remains available in the future.