NeighTools / UnityDoorstop

Doorstop -- run C# before Unity does!
GNU Lesser General Public License v2.1
419 stars 62 forks source link

Debugging the assembly loaded by Doorstop #31

Closed xyx0826 closed 1 year ago

xyx0826 commented 1 year ago

Is there a way to debug the assembly being loaded and executed by Doorstop 4? I have a game built with Unity 2021.3.2f1. I'm able to attach to and debug the game's assembly with dnSpy, though both dnSpy and Visual Studio fails to debug the assembly loaded by Doorstop because the symbols are not loaded.

Now that I know the game's assembly is obfuscated with ConfuserEx, though it is mainly string obfuscation, method renaming, and debugger detection. Even if it contains anti-debug, it should still be possible for me to debug since my assembly runs before Unity loads.

xyx0826 commented 1 year ago

I did some more testing today and somehow dnSpy has started working. I still couldn't get Visual Studio debugger to work, but dnSpy can debug my assembly and the game's already. Looks like ConfuserEx is not related to this issue.