Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] Eclipse AJDT - stepping into advice code

Title: RE: [aspectj-users] Eclipse AJDT - stepping into advice code

Success!  I finally found out how to step into advice code using the Eclipse debugger!  Here are the steps that worked for me.

---

- To avoid stepping through code that is part of the AspectJ framework
  - Select Window...Preferences...Java...Debug...Step Filtering.
  - Click the "Add Packages..." button.
  - Enter"org.aspectj" and click the "OK" button.
  - Click another "OK" button.

- To prevent the compiler from inlining some methods,
  which can make debugging aspect code difficult
  - Select Project...Properties...AspectJ Compiler.
  - Enter "-XnoInline" for "Non standard compiler options".
  - Click the "OK" button.

- To allow Eclipse to find the source for aspects,
  rename all .aj files to .java.

- From the "Run" menu, select "Debug...".

- In the Debug dialog, select the "Stop in main" checkbox and
  click the "Debug" button.

- Use the "Step Into" and "Step Over" buttons to step to advised method calls.
  These are indicated by a special icon in the left-hand margin.

- Use the "Step with Filters" button to step into an advised method.

---

It sure would be nice if I didn't have to rename my aspect source files from .aj to .java.  Is there a way to tell Eclipse that .aj files are Java source files?



***********************************************************************************
WARNING: All e-mail sent to and from this address will be received or
otherwise recorded by the A.G. Edwards corporate e-mail system and is
subject to archival, monitoring or review by, and/or disclosure to,
someone other than the recipient.
************************************************************************************

Back to the top