Reputation: 21
There is a project written in C# which makes use of some external libraries. These are signed libraries (with the version, key) and usually registered in the GAC.
My app uses these libraries. When working and debugging app, I would like to have sometimes access to the source of the libraries, to see how my code goes deeper and what happens inside.
There are libraries which have reference to each other (so they expect the concrete version, with the key)
How could I prepare the libraries to be debuggable with the ability to see source code?
Is the only option to add sources of the DLLs to the project(compile again) and have it referenced by my app?
Upvotes: 2
Views: 643
Reputation: 457472
First, set up a symbol server. This enables your debugger to download the pdb files for the libraries. This will work even for assemblies in the GAC.
Next, source index the pdb files. This embeds information in the pdb files, enabling the debugger to retrieve the source from your source server (e.g., Mercurial, SVN, TFS).
So, you end up needing a source server and a symbol server, and adding a few steps to your build process.
Upvotes: 4
Reputation: 47164
If available, add the debugging symbols (.pdb file) of the referenced assembly into the same folder with the assembly.
If it's an open source project, just download the source or check it out via source control and reference the project itself in your solution instead of the assembly.
For a closed source assembly you could ask the vendor if the source code is available or ask them for a debug compilation with the .pdb file.
Upvotes: 0
Reputation: 925
You cannot debug a library when deployed, you can use exception handling and logging to trace the events while execution. Or you can use the new Intellitrace (http://msdn.microsoft.com/en-us/library/dd264915.aspx) in to trace the execution.
Upvotes: 0