调试动态加载的程序集在Visual Studio .NET [英] Debug dynamically loaded assembly in Visual Studio .NET

查看:165
本文介绍了调试动态加载的程序集在Visual Studio .NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用C#和反射来加载并调用从装配方法。我有大会本身的源代码。什么我需要做的就是调试器步入(不超过)动态加载的程序集的代码?

I am using C# and reflection to load and invoke methods from an assembly. I have the source code of the assembly itself. What do I need to do to get the debugger to step into (and not over) the code of the dynamically loaded assembly ?

如果我按在F11 ... .Invoke线就只有几步之遥了吧..

If I press F11 on the ....Invoke line it just steps over it ..

感谢

推荐答案

生成源本地动态加载的程序集,并确保您拥有的引用应用程序正在运行的PDB文件。

Build the source locally of dynamically loaded assembly and make sure you have the PDB files where the referencing app is running.

这是希望调试人民的共同要求ASP.NET MVC的源代码。有一些注意事项虽然关于GAC。

This is a common requirement for people wishing to debug the ASP.NET MVC source code. There are some caveats regarding the GAC though.

另一种快速的(但脏)的方式做的是暂时补充项目的动态加载的程序集到您的解决方案。这是史蒂夫·桑德森建议调试ASP.NET MVC框架。我个人比较喜欢PDB根。

Another quick (but dirty) way to do is to temporarily add the project for the dynamically loaded assembly to your solution. This is what Steve Sanderson recommends for debugging the ASP.NET MVC framework. Personally I prefer the PDB root.

这篇关于调试动态加载的程序集在Visual Studio .NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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