Loading symbols for a managed DLL doesn't work in Visual Studio with Unity 5.6.1f1

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 in Assets\Plugins\Win64 next to plugin.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

1 Like

I’m having the exakt same issue, running latest VS (2017 15.5.2) and Unity (2017.3). Symbols will not load, selecting load symbols gives no error message but nothing happens.

Still a problem in Visual Studio 15.9.6, Visual Studio Tools for Unity 3.9.0.3, and Unity 2018.2.20f1

Having the same problem also. Have you guys solved it somehow?

Thanks

Any update on this one guys. Having the same problem.

Did you build the DLL yourself? DId you make sure that the debug symbol format is “portable PDB”, as opposed to 'Windows PDB"?

2 Likes

Yes. It’s my DLL.
Build settings in VS is set as “debugging info = Pdb-only”.
There is no “Windows PDB” option.
But there is a “Portable option”. I’ll try that.

That… my friend, totally WORKED!
You were able to provide an info nobody else could have.
Thank you very much.

Debug info setting for pre-compiled DLL in VS project settings must be “PORTABLE”.

As a side note: Exsiting (old) MDB files must be deleted for it to work correctly. Unity still take those old MDBs in effect if they exist.

4 Likes