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

Can't debug a Unity game with DnSpy #397

Open
MrAroGH opened this issue Jan 14, 2025 · 0 comments
Open

Can't debug a Unity game with DnSpy #397

MrAroGH opened this issue Jan 14, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@MrAroGH
Copy link

MrAroGH commented Jan 14, 2025

dnSpyEx version

6.5.1 (64-bit .NET)

Describe the Bug

I'm trying to debug a release build of Unity game (version 2019.2.19.9607860) with DnSpy debugging tools.
The game has both mono.dll and mono-2.0-bdwgc.dll in it's folder, but looks like, the game executable completely ignores mono.dll and uses only mono-2.0-bdwgc.dll (I've tried to delete mono.dll, but game still works fine). Should I force the game to use mono.dll, somehow?

How To Reproduce

Compile debug mono.dll and mono-2.0-bdwgc.dll with Visual Studio 2022 for Unity 2019.2.19-mbe.
Commit hashes from gitk are:
Mono: 67c73d284892c851e77bcd33e2db12c28a5d88d3
MonoBleedingEdge: 3de09918c969e780d780976ea7ebec950275b9d0

Then, replace original Mono files in the game folder with debug ones (..\Mono\EmbedRuntime and ..\MonoBleedingEdge\EmbedRuntime).
After everything ready, try to debug the game in DnSpy with Debug -> Start Debugging (pick Unity).

Expected Behavior

Get an ability to debug the game.

Actual Behavior

The game opens, but after 30 sec timeout, dnSpy says "Couldn't connect to the debugged process. Make sure you have patched the game's mono.dll file".

Additional Context

Debug Mono DLLs will be sent to [email protected]

@MrAroGH MrAroGH added the bug Something isn't working label Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant