c# - 当 .dll 在 Debug模式下请求源代码时

标签 c# asp.net-mvc-3 debugging nhibernate dll

.dll 文件有问题吗?难道它不应该只将代码视为封闭源代码,因为它都是字节代码并且尽量不要单步执行它吗?有什么办法可以做到这一点吗?

例如,我有一个同时使用 Fluent NHibernate 和 NHibernate 的 ASP.net MVC 3 项目。无论我使用哪个版本,如果没有实际访问源代码,我就无法调试正在发生的事情。

我认为这会带来问题,因为我已经安装了必要的二进制文件来构建项目,因此应该能够调试并获取有关我的变量的必要信息,而无需单步执行代码本身。如果不是这种情况(显然不是),我该怎么办?

注意:我的全部目标是看看是否可以在不需要源文件的情况下调试我的代码,因为我安装了 .dll,因此不应该要求源代码来查看变量保存在堆。

最佳答案

检查是否Just My Code在您的调试选项和设置中启用。

来自上面的链接:

Sometimes, while you are debugging, you might want to look at only the code you have written and ignore other code, such as system calls. You can do this with Just My Code debugging. Just My Code hides non-user code so that it does not appear in the debugger windows. When you step, the debugger steps through any non-user code but does not stop in it.

关于c# - 当 .dll 在 Debug模式下请求源代码时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8109391/

相关文章:

c# - 从没有特殊字符的文件中读取

c# - C#上日期业务处理Windows Service

c++ - 如何在visual studio 2022 for c/c++中指定多个调试命令?

c++ - "The breakpoint will not currently be hit. No symbols have been loaded for this document." Visual Studio 2005

JavaScript 调试符号

c# - 错误 : The magic number in GZip header is not correct

c# - 如何使用 txt 文件作为命令行参数?

javascript - 将自定义 JavaScript/jQuery 效果添加到 MVC 3 表单验证

asp.net-mvc - 发布表单数据后如何使用 ModelState 清除表单,我的 View 模型是一个具有两个模型的 View 模型?

asp.net-mvc - ASP.NET MVC 路由 - 无限变量树