Visual C# 回溯:如何知道[外部代码]所在的位置?
我正在使用 Visual C# 来调试大型 C# 项目。项目很大,只有部分pdb是我自己搭建的。我可以构建所有的 pdb,但这非常耗时。我正在调试回溯,但跟踪的一部分标有[外部代码]。我知道缺少一些 pdb,但我如何知道外部代码驻留在哪个 DLL 中?在CI中可以获取EIP,然后查看流程图来确定EIP所在的位置,但是在.Net环境中如何做到这一点?
I am using visual c# to debug a large c# project. The project is very large and only some of the pdbs are build by myself. I can build all the pdb however it's very time consuming. I am debugging a backtrace but a part of the trace is marked with [External Code]. I know some pdb is missing, but how can I know which DLL the external code resides? In C I can get the EIP then see the process mapping to determine where the EIP lives, but how this can be done in .Net environment?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
因此,如果您的项目真的很大,那么我假设您的所有类都沿着名称空间很好地共享,并且所有程序集都以它们包含的名称空间命名。因此,如果查看外部代码的开始(或结束)位置,您应该找出调用的起点(或终点),并确定缺少的程序集 pdb。
So if your project is really so big, than i asume that all your classes are well shared along your namespaces and that all the assemblies are named after the namespaces they contain. So if take a look where your external code begins (or ends) you should find out from (or to) where the call is going and determine the missing assembly pdb.
进入工具|选项|调试|常规,然后取消选中“仅启用我的代码”复选框。现在,Visual Studio 将显示完整的调用堆栈(至少对于托管代码,您仍然可能会在其中看到一些“本机到托管转换”)。
Go into Tools | Options | Debugging | General, and uncheck the "Enable Just My Code" checkbox. Now Visual Studio will show the full call stack (at least for managed code, you still may see some "native to managed transitions" in there).