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 InfoI 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(从同一个解决方案)
发布评论