Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AJDT » Debugging LTW weaved classes(Debugging LTW weaved classes in different browsers)
Debugging LTW weaved classes [message #1060205] Thu, 23 May 2013 09:46 Go to next message
Dumitru Boldureanu is currently offline Dumitru Boldureanu
Messages: 1
Registered: May 2013
Junior Member
Hello everybody,

I have a Spring(3.2.2) + AspectJ(1.7.2) application configured with Load Time Weaving.

In Netbeans, I'm having trouble while debugging woven classes methods, for example the methods annotated with @Transactional. I'm able to put break points in this methods, but when I click "Step over" the debugger doesn't go to the next line, it jumps to line 1 and then to other classes...

I found on stackoverflow (eclipse-debug-stepping-with-aspectj) info that this is a bug in AspectJ.

When I run on Eclipse the debugging is OK, "Step over" works fine(with the exception of the first line in method for which is necessary to press it twice).

Also tried running this code in IntelliJ, there I have the same situation as in Netbeans.

I've googled a lot, but I couldn't find good explanation...
Is this a bug indeed? Does Eclipse IDE has a feature or something that permits the debugging to go smooth? If this is a bug, is there a time frame defined when the bug will be fixed, which release?
Is there a solution/configuration parameter to make this work in other IDEs (Netbeans, IntelliJ), tried -XnoInline, but it didn't help.

Thank you in advance,
Dumitru

[Updated on: Thu, 23 May 2013 10:41]

Report message to a moderator

Re: Debugging LTW weaved classes [message #1060234 is a reply to message #1060205] Thu, 23 May 2013 11:58 Go to previous message
Andrew Eisenberg is currently offline Andrew Eisenberg
Messages: 307
Registered: July 2009
Senior Member
I don't use NetBeans or IntelliJ, so I can't say if they will be able to fix this problem. It looks like to me that you should be using step into rather than step over.

AspectJ will add some synthetic methods to handle advice invocation and access to otherwise private methods. So, the first time that you stop at an advised method, you are actually stopping at the synthetic accessor method. The debugger stops at the method entry point. When you step in again, you will get into the method itself.

This is an artifact of the way that synthetic methods are debugged in the JVM. You will see similar behavior when an inner class invokes a private method of an outer class. This adds a synthetic accessor method as well and you will see the same debug behavior.

I'm surprised that IntelliJ and NetBeans behave differently since both should be using the same JVM debug APIs as Eclipse. Try again and make sure to use step in, instead of over.

Not sure if this answers your question, so please clarify if you have anything else.
Previous Topic:ClassFormatException with AJDT and RAD 8
Goto Forum:
  


Current Time: Tue May 28 05:11:47 EDT 2013

Powered by FUDForum. Page generated in 0.01484 seconds