Copyright © 2003 Eclipse.org.
All Rights Reserved
You can debug
AspectJ programs using the normal Java debugger. A current restriction is that
you can only set breakpoints in classes (not in aspects). To
set a breakpoint, right-click in the gutter of the editor and choose “add
breakpoint.” (You should be able to simply double-click in the gutter to
set a breakpoint, but this function is currently unavailable in AJDT due to a
bug in our code!!).
With one or
more breakpoints set, you launch the Eclipse debugger in the normal way by
clicking on the debug icon in the toolbar. Use the “step into” button
(highlighted) to step into the body of advice.
If this is
the first time the aspect has been loaded or initialised, you will need to
‘step return’ from the class loading, aspect initialisation and “aspectOf” calls before finally being able to “step into”
the advice:
You can use
the Java Debug step filters (Window -> Preferences -> Java -> Debug
-> Step Filtering) to make this process a little easier.
Note – a
current limitation until we have full JSR 45 support is that you cannot step
into ‘around’ advice.