admin管理员组文章数量:1289623
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:
- I have debug symbol (PDB) embedded because the game does not load PDB files:
<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?
本文标签:
版权声明:本文标题:.net - How do I correctly use Attach to Process to debug my C# DLL in a Unity game? (No Unity IDE involved) - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741479858a2381103.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论