Unable to step into Managed Plugin Code

I’m writing a Managed Plugin which I would like to debug, but I’m unable to step into the code when debugging it in Visual Studio (Windows).

I’m following the Step by Step Guide for Visual Studio in the Unity Documentation for Managed Plugins. In addition to adding the dll to the assets folder, I’ve made sure to include the pdb file in the same location (as per “Verify the managed debugging information is available” here). The code in the guide runs fine and I can break into the script file, though if I try to step into the function defined in the managed plugin it steps over it instead. If I try to manually link the pdb file in Visual Studio it gives me an error: “A matching symbol file was not found in this folder”. The pdb appears to match the dll since I can add it to a new project created in Visual Studio and debug it in there.

My dll project’s debugging information is set up as Portable, and it targets .NET Standard 2.0.

Any idea what could be causing this issue?

So I have managed to find a workaround: if I include the dll project as an existing project in the Unity solution I still can’t step into the method, but if I then put a breakpoint inside the method that’s called and then step over, the breakpoint will be hit. It’s a little bit tedious to have to do it that way so a real solution would still be nice, but if I can’t find any then this should be sufficient.