-
1. Re: How to set a breakpoint for weaved classes.
smile24 Oct 29, 2008 5:31 PM (in response to par_yosa)I am also interested in this topic. I compile my .class files with aopc and see that in jar file appear new classes which names looks like this Service$service_1879079915250818794.class. I'm trying to debug my application using remote java application debugging in eclipse but it is no possible. I'm unable to debug beacause breakpoints can not be set because of missing line number attributes. Could somebody write what should I do to be able to debug my aspectized application? I use JBossAOP 1.5.6.GA release and JBossAS 4.2.2.GA.
-
2. Re: How to set a breakpoint for weaved classes.
flavia.rainone Oct 29, 2008 7:30 PM (in response to par_yosa)It is true that there is code running you can't see the lines it came from. AFAIK, there is no solution for this as you don't have the sources of the code that JBoss AOP weaves in your classes.
Still, when I need to debug some aspectized class, I just add the breakpoint to the parts that I have written and that I want to debug, and it works. Inclusively, it works when I need to debug an aspect, I just add the breakpoint to the aspect itself and Eclpise stops when the aspect execution starts.
If you run into a point of the stack where Eclipse gets lost (i.e., where it doesn't show where is the line it is running), just proceed pressing F5 until you get to your aspects code or until you get back to your aspectized class. I'm writing a tutorial about this at our blog, by the way. The part II, that talks about this stuff, should come out really soon. -
3. Re: How to set a breakpoint for weaved classes.
smile24 Oct 30, 2008 6:52 AM (in response to par_yosa)Hello Flavia,
Thanx for really quick answer.
"Still, when I need to debug some aspectized class, I just add the
breakpoint to the parts that I have written and that I want to debug, and it works. Inclusively, it works when I need to debug an aspect, I just add the breakpoint to the aspect itself and Eclipse stops when the aspect execution starts."
Could you write if it is any difference for debugging when I compile code with aopc in ant task so all compiled classes are stored then in my jar file or if I let JBoss to compile aopclasses in deploy time and aopclasses are stored then in .....\tmp\aopdynclasses\ucl... ?
"If you run into a point of the stack where Eclipse gets lost (i.e., where it doesn't show where is the line it is running), just proceed pressing F5 until you get to your aspects code or until you get back to your aspectized class. I'm writing a tutorial about this at our blog, by the way. The part II, that talks about this stuff, should come out really soon."
I read first part and can't wait to read this part II. Wish you the best to finish soon :) -
4. Re: How to set a breakpoint for weaved classes.
kabirkhan Oct 30, 2008 7:02 AM (in response to par_yosa)"smile24" wrote:
Could you write if it is any difference for debugging when I compile code with aopc in ant task so all compiled classes are stored then in my jar file or if I let JBoss to compile aopclasses in deploy time and aopclasses are stored then in .....\tmp\aopdynclasses\ucl... ?
There is no difference.
It might help to run some of the examples that come with the aop download using aopc, and then use jad to decompile the generated classes to get a feel for what jboss aop generates, so you have more of an idea what/when to step in when debugging