Question

I have built a Library project (DLL) in .NET. And sometimes I use the DLL along with its PDB file as a reference in some other projects.

Now in the new project, I cant browse through the code of the DLL to debug. I can only see the definitions of class/methods/variables. That's by using "show definition" by browsing through the "class view"

However, only in case of an exception I the contents of the DLL opens and I could see the entire code of the DLL from the new project.

How could I see the contents (code) of the DLL before an exception occur?

Was it helpful?

Solution

If you just need to browse the code, load the dll up in Reflector -- you don't even need the PDB file: http://www.red-gate.com/products/reflector/

OTHER TIPS

If an app loads the DLL while running under the Visual Studio debugger, it should load the symbols automatically. If all you have is a DLL, you may need to write a "driver" app that does nothing but load and exercise the DLL entry points.

If you want to debug your application programmaticaly, take a look at Mdbg (managed dbg). You can also take a look at pdb2xml source, which give you good example of ISymbolReader interface, and how to use it to read pdb files.

Use JustDecompile, it's free.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top