如何获取EntityFramework NuGet软件包的PDB文件? [英] How can I get a PDB file for the EntityFramework NuGet package?
问题描述
我正在尝试在EntityFramework NuGet软件包(6.1.3版)中调试一个StackOverflow。为了看到堆栈帧,我需要PDB文件为EntityFramework.DLL和EntityFramework.SqlServer.DLL。然而,我似乎无法让Visual Studio从MSFT符号源或SymbolSource.org下载(我可以得到其他系统PDB和诸如NewtonSoft.json之类的东西)。 EF PDB可以在任何地方使用吗?
现在有了图片(因为我花了大约一个小时的试用和失败) p>
-
获取
-
转到折叠呃您导出它并打开
/ li>EntityFramework.pdb
文件夹(我知道!)然后深入挖掘,直到找到一个文件EntityFramework.pdb
并将其复制到您的bin
文件夹(EntityFramework.dll
旁边)。
-
转到
Visual Studio
- >DEBUG
- >选项和设置...
- >符号
然后添加您的bin
文件夹到符号文件(.pdb)位置
< a href =https://i.stack.imgur.com/B3tAZ.png =noreferrer>
- 运行项目并祈祷这些断点变成成熟的红色....
编辑有时会在优化的
模式,使调试几乎没用,这是这个问题的一个重点 - 如果发生这种情况
- 转到
Visual Studio
- >调试
- >一般
- >(在最底端)使用托管兼容模式
。勾选和运行项目(如果它被优化,然后取消并运行,然后再次打勾并运行,然后....)
< a href =https://i.stack.imgur.com/vBsrE.png =noreferrer>
- 查看
EF
运行优化,而不必等待它到达断点转到Visual Studio
- >调试
- > code> Windows - >模块
。那么当你运行解决方案模块(2)应该出现。点击它并找到EntityFramework.dll
应该有列说明优化(是
=坏,
希望这样可以节省你一些时间。
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
DotPeek
->File
->Open
-> browse to your projectbin
folder and openEntityFramework.dll
Right mouse button on
EntityFramework
then chooseGenerate Pdb...
Go to folder where you exported it and open
EntityFramework.pdb
folder (I know right!) then dig deeper till you find a fileEntityFramework.pdb
and copy it to yourbin
folder (next toEntityFramework.dll
).Go to
Visual Studio
->DEBUG
->Options and Settings...
->Symbols
then add yourbin
folder toSymbol file (.pdb) locations
- Run project and pray those breakpoints turn ripe red....
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
- Go to
Visual Studio
->Debug
->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 ....)
- To see if
EF
runs optimized without having to wait till it hits breakpoint Go toVisual Studio
->Debug
->Windows
->Modules
. Then when you run solution modules (2) should appear. Click it and findEntityFramework.dll
there should be column that says Optimized(Yes
= bad,No
= you can debug it).
Hope this saves you some time.
这篇关于如何获取EntityFramework NuGet软件包的PDB文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!