Announcement Announcement Module
No announcement yet.
Debugging AspectJ LTW classes methods issues with with Spring 3.2.2 Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Debugging AspectJ LTW classes methods issues with with Spring 3.2.2


    I've discovered that debugging, steeping over the source code (going line by line) is not working property LTW (AspectJ 1.7.2) with Spring 3.2.2.

    For example, when enter in method saveTestData when we step over we expect the stack to go from line 1 to line 2, then from line 2 to line 3, etc. When we step over the last line (return dao.saveTestData(entity) we should get back into the class that called the saveTestData method. What happens in reality is that the debug flow jumps irregularly, for the class we debug into to AOP AspectJ internal classes and it differs a bit from IDE to IDE.

        public TestData saveTestData(TestData entity) {
            return dao.saveTestData(entity);
    Since I've never used AspectJ before, first I though this is something AspectJ specific, and AspectJ but. I'm using Netbeans, then I've tried this on Eclipse and IntelliJ IDEA, there the debugging went better, I could get from one line to another, but when exiting the method (stepping over the last line), it jumped to AspectJ internal classes.

    In one of my tests the version of Spring was set different(3.1.0) and it suddenly worked.
    It also works for 3.2.0, 3.2.1 (perhaps for other versions also, these are the only ones I've tested).

    Do you know of this issue (I've search through google but couln't find anything)?

    If this is an issue I'd be glad to open one on jira and provide a test project.


  • #2
    Spring 3.2.3

    The issue is also present in Spring 3.2.3


    • #3
      This is likely not an issue with Spring (though it's filed as issue

      In 3.2.2, @Transactional annotations were changed to use a AspectJ @Around instead of @Before/@After -- more info here: In the case of IntelliJ IDEA, the frame stack is re-written and displayed to the user as if the AspectJ classes/frames don't exist, which makes debugging much easier. Either AspectJ doesn't provide sufficient metadata for IDEA to do this or IDEA just doesn't process the @Around woven code in the same way as @Before/@After -- it's not clear right now which it is. IDEA issue is intended to address this issue.