I have a managed DLL compiled against the .NET framework version 3.5. Let’s call it plugin.dll
.
In my Unity project I have placed it in Assets\Plugins\Win64
and I can use it just fine with the VS project generated by Unity.
I can attach a debugger to the running Unity instance and place breakpoints in all the C# code that belongs to the Unity project, but the symbols for the managed DLL just won’t load.
So, when debugging the project by clicking “Attach to Unity” I can see plugin.dll
in the Modules window but the symbols for it don’t get loaded.
I have tried the following things:
- Turning off Just My Code
- Placing the generated
plugin.pdb
file inAssets\Plugins\Win64
next toplugin.dll
- Adding my VS build directory (with all .pdb’s) to Visual Studio’s Symbol locations list
I’m sure that the .pdb is for the correct version of the library.
If I right click on plugin.dll
in the Modules window and choose “Symbol Load information…” no window opens, which is surprising.
If I choose “Load Symbols” from the menu instead, then a modal window with title “Downloading symbols” that says “plugin.dll” gets shown for a few seconds but nothing happens:
I can see plugin.pdb
appearing in the symbol cache directory though, so VS seems to find the file.
Specs:
Windows 10 Enterprise 64-bit
Microsoft Visual Studio 2015, Version 14.0.25431.01 Update 3, .NET 4.7.02046
Unity 5.6.1f1 Personal Edition