Trying to debug C# dll with VS 2019 and Rider 2021.1.3. Everything compiles and dll is copied to the right location as well as .pdb file. But none of the breakpoints get hit on either of IDEs.
On Rider got a notification: "Didn't find the associated module for the breakpoint..."
On Visual Studio the breakpoint simply doesn't get hit.
The code changes get propagated, so the code itself works fine and gets executed, but debugging doesn't work at all.
What I have done: pretty much everything what is described here: Debugging properties setup
Except for cleaning up AppData since there is no the directory for Temporary ASP.NET Files
Have reinstalled Rider in to the similar location on the same drive where the solution is.
Set the Debug options on VS as described in the link
Using Debug option of course.
Set the Symbols file path on Tools -> Options -> Debugging -> Symbols
Also, somewhat similar setup works for C++ project I have, but not for the C# one.
Also, when I attach to the process, then somehow the Window -> Modules doesn't show my dll in the list. Which is probably because it is a mono project. But it is 100% loaded as I've mentioned above as the code changes are picked up.
Rider setup for dll debug:
{
"profiles": {
"Assembly-CSharp": {
"commandName": "Executable",
"executablePath": "$(ProjectDir)..\\....exe",
"remoteDebugEnabled": false
}
}
Update: One of the problems potentially is that I have mono.dll in the Debug > Windows > Modules, but not the dll I am working with. So, in that case, how do I explicitly see my dll in the list of the loaded modules so that I can load .pdb file manually? Is it even possible (relevant) in this case?
Update1: Found this which might be relevant in this case.
Update2: Found configuration for Unity projects (managed dlls). From this, the only relevant part is at the end with selection of the appropriate target Framework. Trying to find out of how to be able to configure it.