Open DaemonSharps opened 1 year ago
It is a side effect of the way around method is implemented. I didn't catch it earlier somehow :) Asyncs have a bit different implementation thought. I'll look into it! Thank for the report
please see if 2.8.2-pre3 fixes it for you?
Yes, it`s work! Thank you!!!!
@pamidur
Can you please release an official 2.8.3 release (and also update Aspects.Universal
to use this latest fixed version 2.8.3 from AspectInjector
) ?
I just released 2.8.2 today. It should contain all the latest fixes. I'll update Aspect.Universal soon
On Fri, 7 Jul 2023, 20:53 Stef Heyenrath, @.***> wrote:
@pamidur https://github.com/pamidur Can you please release an official 2.8.3 release (and also update Aspects.Universal to use this latest fixed version 2.8.3 from AspectInjector) ?
— Reply to this email directly, view it on GitHub https://github.com/pamidur/aspect-injector/issues/217#issuecomment-1625080982, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7HZUEMVNS7ME53RUE5LALXO7E7XANCNFSM6AAAAAAYNOIDAM . You are receiving this because you were mentioned.Message ID: @.***>
@pamidur
I'm used the 2.8.2
and 2.8.3-pre1
but for some reason I still get the same issue for an exception in a try-catch ?
Could this still be an issue?
I well could. Please reopen the issue, I'll take a look at exception block behaviour
On Tue, 1 Aug 2023, 17:56 Stef Heyenrath, @.***> wrote:
@pamidur https://github.com/pamidur I'm used the 2.8.2 and 2.8.3-pre1 but for some reason I still get the same issue for an exception in a try-catch ?
[image: image] https://user-images.githubusercontent.com/249938/257418351-65f69674-4f0d-44ea-9922-fbb0dc230d04.png
Note that this method is synchronous.
Could this still be an issue?
— Reply to this email directly, view it on GitHub https://github.com/pamidur/aspect-injector/issues/217#issuecomment-1659616079, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7HZUEQTCNNG2H6I4ODRE3XTCLATANCNFSM6AAAAAAYNOIDAM . You are receiving this because you were mentioned.Message ID: @.***>
@pamidur - I cannot reopen this issue because I did not create it.
No worries, I'm on it
Hello, I've had the same issue with a WPF project using .Net Core 3.1 Downgrading to version 2.4.1 of aspect-injector solved the issue. Hope it can help you.
No worries, I'm on it
Did you have time yet to fix this?
still looking into it, sorry, don't have much time recently :(
I've solved this issue with a split of Around Advice in Before and After. And now the debugger works fine :
[Advice(Kind.Before, Targets = Target.Method)]
public void BeforeMethod([Argument(Source.Name)] string name, [Argument(Source.Type)] Type instanceType, [Argument(Source.Arguments)] object[] arguments)
and
[Advice(Kind.After, Targets = Target.Method)]
public void AfterMethod([Argument(Source.Name)] string name, [Argument(Source.Type)] Type instanceType, [Argument(Source.Arguments)] object[] arguments, [Argument(Source.ReturnValue)] object result)
Environment:
Describe the bug Local variables are not visible when debugging synchronous methods when using AspectInjector.
To Reproduce I am using example from README
Use with synchronous test method.
And get that exception:![image](https://github.com/pamidur/aspect-injector/assets/56834210/d00da6f9-512d-4610-812e-159d1e926ead)
But with async method it works correctly:![image](https://github.com/pamidur/aspect-injector/assets/56834210/71f2250e-5467-4a9e-8bc7-d956353aa7c7)
Additional info: Old issue for async methods https://github.com/pamidur/aspect-injector/issues/71