简体   繁体   English

如何将VS2010调试器连接到SheepAop编织组件?

[英]How to attach VS2010 debugger to a SheepAop weaved assembly?

I'm giving SheepAOP a go for a new project, but i'm hitting a point where i can't use the VS2010 debugger. 我正在给SheepAOP一个新的项目,但我正在达到一个我无法使用VS2010调试器的地步。 The breakpoints are not recognised and it looks like the pdbs are out of sync with the weaved code. 断点无法识别,看起来pdbs与编织代码不同步。

I've tried it with the sample provided on the SheepAOP website , but no cigar there either. 我已经尝试过在SheepAOP网站上提供的样本,但也没有雪茄。

SheepAspect produces bytecodes that are specifically intended to maintain debuggability, but one thing that I find necessary is to make sure you turn on "Just My Code" in your VS debugging options. SheepAspect生成专门用于维护可调试性的字节码,但我认为必要的一件事是确保在VS调试选项中打开“Just My Code”。 You could still reach your aspect code using breakpoint regardless of that option, but to make your F11(step-into) jump into your aspect, I find that "Just my code" option is required. 无论选项如何,你仍然可以使用断点来获取方面代码,但为了使你的F11(步入)跳到你的方面,我发现需要“只是我的代码”选项。 Otherwise it will only jump thorugh your (original) code, skipping any injected aspect it may pass. 否则它只会跳过你的(原始)代码,跳过它可能通过的任何注入方面。 (I was going to add this in the "debugging & unit-testing tips" section). (我打算在“调试和单元测试技巧”部分中添加它)。

I've yet to investigate the root of this issue, but it seems to be a limitation within Visual Studio that seemingly just "gives up" to proceed further with the debugging whenever it runs into any instruction with no corresponding source-code. 我还没有调查这个问题的根源,但它似乎是Visual Studio中的限制,似乎只是“放弃”进一步调试,只要它遇到任何没有相应源代码的指令。 "Just my code" option prevents visual studio to get to that situation in the first place. “只是我的代码”选项可以防止Visual Studio首先处理这种情况。

Let me know if that solves your problem. 如果能解决您的问题,请告诉我。

(UPDATED to fix inaccurate explanation as per my comment below) (根据我的评论,更新以修复不准确的解释)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM