Search code examples
c#.netpdb-files

How do I determine the file and line # of a C# method from a symbols (.pdb) file?


pdb files contain symbol information for .NET assemblies. I'd like to read a pdb file in order to correlate methods with their file location. The data is contained within it but I can't seem to find a good description of how to get it out.

I know about mdbg, but that is very heavy (I think/hope) for what I want.


Solution

  • You should look:

    • Mono.Cecil and especially the Mono.Cecil.Pdb module. It should do what you want and more.