Reputation: 37000
I have a VS Solution with some breakpoints. When I attach the solution to a third-party program the breakpoints are omitted ("The breakpoint will not currently be hit. No symbols have been loaded for this document"). Confusingly breakpoints of any (referenced) project that are not within my solution are hit, only those within my own solution are not. So when interacting the third-party tool I cannot debug through my projects. I also tried out this but the problem still occurs. I also re-built the whole solution to re-recreate the DEBUG-information-files for the projects. The location is the same as for the other solutions, but apparently its contained information is not loaded. Any ideas why?
Upvotes: 1
Views: 7271
Reputation: 123
I was able to solve this problem in Visual Studio by changing the Solution Configuration from Release to Debug.
Upvotes: 0
Reputation: 1149
You can try these answers too if problem exists after.
Referring to : First answer or see : Second answer
Start debugging, as soon as you've arrived at a breakpoint or used Debug > Break All
, use Debug > Windows > Modules
. You'll see a list of all the assemblies that are loaded into the process. Locate the one you want to get debug info for. Right-click it and select Symbol Load Information. You'll get a dialog that lists all the directories where it looked for the .pdb file for the assembly. Verify that list against the actual .pdb location. Make sure it doesn't find an old one.
In normal projects, the assembly and its .pdb file should always have been copied by the IDE into the same folder as your .exe. The bin\Debug folder of your project. Make sure you remove one from the GAC if you've been playing with it.
Upvotes: 0
Reputation: 37000
Finally I found the answer in this post. I took a look into the loaded modules (Debug->Windows->Modules while having assembly attached to process) and noticed that my actual assembly wasn´t in the list. The code I wanted to debug is built with .NET 3.5 but modules have only been loaded for .NET 4.0. Usually this might be detected automatically as far as I am concerned but however this time automatic detection did not work for some weird reason so I changed selected code type from managed (v4.0) to managed (v2.0) and now it works. Hope this won´t occur when I have to debug on .NET 4.0 later again...
Upvotes: 2