Reputation: 20748
I am making mods for a game made with Unity. They are compiled using netstandard2.1
, Class Library project type. The game then dynamically loads those mods' DLL files. I code it using Visual Studio only and no Unity involved or even installed.
However, when using VS' Attach to Process feature, the breakpoints don't hit. I have checked:
<DebugSymbols>true</DebugSymbols>
<DebugType>embedded</DebugType>
I know the debug symbols are there by confirming with UnityEngine.Debug.Log(new StackTrace(true))
and the line numbers are there. If there is no debug symbol, line numbers would not be there.
I tested with a Console app and I know I can attach to a process with embedded
PDB so I know it's possible.
The only difference I can see is: when attaching to my test ConsoleApp
, the Code type would be Automatic: Managed, but when attaching to the game's process, it says Automatic: Native. So I assume maybe Unity or Mono did something to the game so my DLL is no longer recognizable by VS. I did manually change it to Managed as well but it didn't hit still.
What could be the issue here? How do I debug my mods?
Upvotes: 0
Views: 68