jbevain / cecil

Cecil is a library to inspect, modify and create .NET programs and libraries.
MIT License
2.77k stars 630 forks source link

Embedded PDBs not readable by VisualStudio #856

Closed tom-englert closed 2 years ago

tom-englert commented 2 years ago

With the latest changes 79b43e8 in PortablePdb.cs assemblies modified with cecil can no longer be debugged in VisualStudio when embedded pdbs are used.

See https://github.com/Fody/Fody/issues/1110 for details how to reproduce.

ltrzesniewski commented 2 years ago

Here's a minimal repro which uses Fody, if it helps: TestProject.zip

jbevain commented 2 years ago

:(

Thanks for the heads-up!

tom-englert commented 2 years ago

I've created some test project without Fody, so this can be instantly checked within the cecil solution: https://github.com/tom-englert/cecil/tree/%23856 image

devenv_5EXsg5IJEt Just put a breakpoint on the unit test in the Testtee project and try to debug the test => Breakpoint never hits!

I've also reverted the changes to the PdbWriter to verify that this is the root cause: https://github.com/tom-englert/cecil/tree/%23856_Fix