Reputation: 8363
I have two solutions, A and B. In solution A, I have a project A1 (which outputs to a DLL). A1 is originally used only within solution A, but because of some unforeseen circumstances, one of the project in solution B ended up requiring it.
I copied the DLL file of project A1 from solution A, to solution B, adding it as a reference. I did it in a manual manner; I have to copy and replace the DLL manually whenever there is a change in A1.
Everything is fine until one day, I realized that I am getting breakpoints during debug. To my surprise, the breakpoints are in the class from A1. I am able to see the full codes that I wrote on solution A, including the comments. When I remove the breakpoints from there, it would come back when I debug the next time. It seemed to disappeared the next day, though.
Now my question is: Why am I able to see the full codes when I did not copy the source of A1 to solution B? My understanding is that DLLs require a decompiler to return to its code state. Even with a decompiler, it should only give me just something similar, but not exact. The most amazing part is that I can even see the all the comments that I wrote.
I am using VS2012 Pro, using .NET 4.5.
Upvotes: 0
Views: 29
Reputation: 127543
When building in debug mode the full source code is stored inside the .pdb file for the assembly. Also, if you you are in release mode it still contains the path to the source code, if the dll was built on the same computer it will navigate to that path and show the source on your hard drive.
During the days that it was happening you likely copied both the .dll and the .pdb, but then you got a new version of the .dll and you either deleted the pdb or the versions nolonger matched so it stopped using it.
Upvotes: 1