开发者

How to attach VS2010 debugger to a SheepAop weaved assembly?

开发者 https://www.devze.com 2023-03-12 22:03 出处:网络
I\'m giving SheepAOP a go for a new project, but i\'m hitting a point where i can\'t use the VS2010 debugger. The breakpoints are not recognised and it looks like the pdb开发者_Go百科s are out of sync

I'm giving SheepAOP a go for a new project, but i'm hitting a point where i can't use the VS2010 debugger. The breakpoints are not recognised and it looks like the pdb开发者_Go百科s are out of sync with the weaved code.

I've tried it with the sample provided on the SheepAOP website, but no cigar there either.


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. 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. 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. "Just my code" option prevents visual studio to get to that situation in the first place.

Let me know if that solves your problem.

(UPDATED to fix inaccurate explanation as per my comment below)

0

精彩评论

暂无评论...
验证码 换一张
取 消