Reputation: 83
I don't have much hope anyone will be able to answer this, but I'll try anyway:
In Visual Studio 2010, when I click to set a breakpoint in any file, another file opens and the breakpoint gets set to the same line number in that file instead.
To illustrate:
As always, any help would be appreciated.
Upvotes: 4
Views: 761
Reputation: 11
You are not alone!
I have the exact same issue with Visual Studio 2015 and it's very annoying. In my experience, it only happens when 2 different projects (in the same solution) both contain a file with the same name.
It's related to the different PDB files and the order in which they are loaded. If the debugger can find a file with matching name, it doesn't seems to care whether it's found in the good PDB or not.
Sadly enough, this has been documented for a while on MSDN (msdn.microsoft.com/en-us/library/h6aesyw2%28v=vs.100%29.aspx) and it still is not resolved.
Microsoft's workaround is to write the full file path when adding breakpoints, but I don't find this to be a viable solution as it drastically slows down the debugging process.
Here are other "solutions" I have found:
Hope this helps!
Upvotes: 1