Skip to content

How to debug mod

newman55 edited this page Sep 6, 2024 · 2 revisions

Debugging works only above version 0.24.3 via Doorstop.

I know two ways. But I guess this may not work with all versions of the Unity.

Start the game with the command line parameters --doorstop-mono-debug-enabled true. The default debugging address is 127.0.0.1:10000.

  1. Open dnSpy, open the assembly file YourMod.cache.dll from the mods folder, it should be compiled in debug mode. Start debugging and select Unity connection, enter port 10000 and run. Create a breakpoint.
  2. Open dnSpy, open the assembly file Assembly-CSharp.dll from the Game_Data\Managed. Start debugging and select Unity, set executable file path and run. Press Ctrl+Alt+U and select your mod dll. Create a breakpoint.
Clone this wiki locally