Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] Debugging and AspectJ

Thanks a million Chris,

That worked a charm

Sean 

-----Original Message-----
From: aspectj-users-bounces@xxxxxxxxxxx
[mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Chris Elgar
Sent: Tuesday, June 13, 2006 5:25 PM
To: aspectj-users@xxxxxxxxxxx
Subject: Re: [aspectj-users] Debugging and AspectJ

Hi Sean

I haven't done this for a while, but I think its something like:

<iajc sourceroots="${src.dir}:${src.aspects.dir}"
      X="noInline,anyOtherXOption,..."
      ...

Cheers Chris

----- Original Message -----
From: "O'Shea, Sean" <Sean.O'Shea@xxxxxxx>
Date: Wednesday, June 14, 2006 9:04 am
Subject: [aspectj-users] Debugging and AspectJ

> Hi all,
> 
> I'm new to the list so apologies if this has already been covered. I'm
> using AspectJ 1.5.1a with AJDT 1.2.2 in Eclipse 3
> 
> I'm using compile time around aspects to inject logic as follows:
> 
> pointcut methodToInject(Object arg1):execution(boolean
> MyClass.myMethod(Object)) && args(arg1);
> 
> boolean around(Object arg1): methodToInject(arg1)
> {
>        System.out.println("Injecting here");
>        return proceed(arg1);
> }
> 
> I compile the jar file using the iajc task as follows
> 
> <iajc sourceroots="${src.dir}:${src.aspects.dir}"
>        destdir="${classes}"
>        fork="true"
>        debug="on">
>        <classpath refid="compile.classpath"/>
> </iajc>
> 
> This creates the jar file fine. I've even decompiled the classes which
> are getting instrumented by the around advice and I can see the around
> advice getting applied. Even when I run the application I get the
> System.Out call being printed to the console. So, I know for definite
> the code is actually getting executed.
> 
> However, when I go to debug the application and I put a breakpoint at
> the System.Out call, the debugger never hits the breakpoint. I've a
> feeling this might have something to do with the "No inline" flag 
> whichyou can set in the IDE as I've heard around aspects can play 
> tricks with
> the debugger. However, as I have to use ant to build the jar file, I
> need to be able to set the "No inline" flag somewhere in the iajc task
> 
> I see this in the developer's guide, but I'm not too sure how to 
> use it:
> Set experimental option(s), using comma-separated list of accepted
> options Options should not contain the leading X. Some commonly-used
> experimental options have their own entries. The other permitted ones
> (currently) are serializableAspects, incrementalFile, lazyTjp,
> reweavable, notReweavable, noInline, terminateAfterCompilation,
> ajruntimelevel:1.2, and ajruntimelevel:1.5. Of these, some were
> deprecated in AspectJ 5 (reweavable, terminateAfterCompilation, 
> etc.). 
> 
> Has anyone used the noInline option in a iajc task before.
> 
> All help would be greatly appreciated
> 
> Thanks
> 
> Sean
> 
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinf
> 

Attention:
This email may contain information intended for the sole use of
the original recipient. Please respect this when sharing or
disclosing this email's contents with any third party. If you
believe you have received this email in error, please delete it
and notify the sender or postmaster@xxxxxxxxxxxxxxxxxxxxx as
soon as possible. The content of this email does not necessarily
reflect the views of SolNet Solutions Ltd.




Back to the top