如何获取EntityFramework NuGet软件包的PDB文件? [英] How can I get a PDB file for the EntityFramework NuGet package?

查看:727
本文介绍了如何获取EntityFramework NuGet软件包的PDB文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在EntityFramework NuGet软件包(6.1.3版)中调试一个StackOverflow。为了看到堆栈帧,我需要PDB文件为EntityFramework.DLL和EntityFramework.SqlServer.DLL。然而,我似乎无法让Visual Studio从MSFT符号源或SymbolSource.org下载(我可以得到其他系统PDB和诸如NewtonSoft.json之类的东西)。 EF PDB可以在任何地方使用吗?

解决方案

现在有了图片(因为我花了大约一个小时的试用和失败) p>


  1. 获取



  1. 转到折叠呃您导出它并打开 EntityFramework.pdb 文件夹(我知道!)然后深入挖掘,直到找到一个文件 EntityFramework.pdb 并将其复制到您的 bin 文件夹( EntityFramework.dll 旁边)。

    / li>
  2. 转到 Visual Studio - > DEBUG - > 选项和设置... - > 符号然后添加您的 bin 文件夹到符号文件(.pdb)位置


< a href =https://i.stack.imgur.com/B3tAZ.png =noreferrer>


  1. 运行项目并祈祷这些断点变成成熟的红色....

编辑有时会在优化的模式,使调试几乎没用,这是这个问题的一个重点 - 如果发生这种情况


  1. 转到 Visual Studio - > 调试 - > 一般 - >(在最底端)使用托管兼容模式。勾选和运行项目(如果它被优化,然后取消并运行,然后再次打勾并运行,然后....)

< a href =https://i.stack.imgur.com/vBsrE.png =noreferrer>


  1. 查看 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)

  1. Get DotPeek from Jetbrains (Standalone version)

  2. Open DotPeek -> File -> Open -> browse to your project bin folder and open EntityFramework.dll

  3. Right mouse button on EntityFramework then choose Generate Pdb...

  1. 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 EntityFramework.dll).

  2. Go to Visual Studio -> DEBUG -> Options and Settings... -> Symbols then add your bin folder to Symbol file (.pdb) locations

  1. 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

  1. 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 ....)

  1. To see if EF runs optimized without having to wait till it hits breakpoint Go to Visual Studio -> Debug -> Windows -> Modules. Then when you run solution modules (2) should appear. Click it and find EntityFramework.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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆