I'm trying to debug a StackOverflow in the EntityFramework NuGet package (version 6.1.3). In order to see the stack frames I need the PDB file for EntityFramework.DLL and EntityFramework.SqlServer.DLL. However, I can't seem to get Visual Studio to download this from either the MSFT symbol sources or from SymbolSource.org (I can get other System PDBs and things like NewtonSoft.json). Are the EF PDBs available anywhere?
Now with pictures (as it took me about an hour of trial and fail)
Get DotPeek from Jetbrains (Standalone version)
Open -> browse to your project
bin folder and open
Go to folder where you exported it and open
EntityFramework.pdb folder (I know right!) then dig deeper till you find a file
EntityFramework.pdb and copy it to your
bin folder (next to
Visual Studio ->
Options and Settings... ->
Symbols then add your
bin folder to
Symbol file (.pdb) locations
Edit: It sometimes starts running EF in
optimized mode that renders debugging pretty much useless which is a whole point of this question - if this happens
General-> (at the very bottom)
Use Managed Compatibility Mode. Tick and Run project (if it gets optimized then untick and run, then tick again and run, then ....)
EFruns optimized without having to wait till it hits breakpoint Go to
Modules. Then when you run solution modules (2) should appear. Click it and find
EntityFramework.dllthere should be column that says Optimized(
No= you can debug it).
Hope this saves you some time.