Visual Studio不会调试到引用的DLL(从同一个解决方案) [英] Visual studio won't debug into referenced DLL (from same solution)
问题描述
$ b
B对A有项目引用,而A.dll和A.pdb正被复制到B的bin /目录。
一切都设置为在调试模式下编译。
我可以运行cassini webserver并调试网页应用程序B很好,但是当我在A.dll中调用一个方法时,按F11键进入它,它不会进入它,它会跳过它。我想进入它。
任何想法为什么我可能无法进入A的源代码?
编辑:其他信息
我没有'只是我的代码'检查。
可以在DLL中设置一个断点,它显示为一个红色圆圈(不是一个空心的),但它不会被击中。
嗯...我刚刚改变了正在调用的DLL中的代码以
抛出新的异常(Hello);
我没有得到例外。这很可疑...
Aha!
在BI中正在调用返回的 IEnumerator< SomeObject>
。这是一个带有关键字的迭代器块,所以没有执行(因为我还没有写过消费者)。
sigh / p>
I have a Visual studio 2008 solution, with 2 projects. A DLL, A, and a Web application, B.
B has a project reference to A, and A.dll and A.pdb are being copied to B's bin/ directory.
Everything is set to compile in debug mode.
I can run the cassini webserver and debug web application B fine, but when I come to call a method in A.dll, pressing F11 to step into it does not step into it, it steps over it. I want to step into it.
Any ideas why I might not be able to step into the source code of A?
Edit: Additional Info
I do not have 'just my code' checked.
I can set a breakpoint in the DLL, and it shows as a red circle (not a hollow one), but it is never hit.
Hmmm... I just altered the code in the DLL which is being called to start with
throw new Exception("Hello");
And I'm not getting an exception. That's pretty suspicious...
Aha!
The method in B I was calling returned IEnumerator<SomeObject>
. It was an iterator block with yield keywords and so was not being executed (as I hadn't written the consumer yet).
sigh
这篇关于Visual Studio不会调试到引用的DLL(从同一个解决方案)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!