title: How to enable debug symbols in eclipse using AspectJ?
body: <p>I'm trying to access the name of a parameter using aspectJ, but I always get <strong>arg0</strong> instead of the <em>real</em> name. I found that I should activate java debugging options with -g parameter at <a href="https://stackoverflow.com/questions/5720494/aspectj-joinpoint-question">AspectJ JoinPoint question</a> but that doesn't work for me...</p>
  
  <p><strong>This is my java code:</strong></p>
  
  <pre><code>private Set&lt;Collection&lt;String&gt;&gt; s;
  private Collection&lt;String&gt; c;
  
  public HashCodeProperty() {
      s = new HashSet&lt;Collection&lt;String&gt;&gt;();
      c = new ArrayList&lt;String&gt;();
  }
  
  /**
   * method that satisfy property
   */
  public void satisfy() {
      c.add("this is ok");
      s.add(c);
      System.out.println("Collection is in Set: " + s.contains(c));
  }
  
  /**
   * method that violate the property
   */
  public void violate() {
      c.add("this is ok");
      s.add(c);
      c.add("don't do this");
      System.out.println("Collection is in Set: " +s.contains(c));
  }
  </code></pre>
  
  <p><strong>This is my AspectJ code:</strong></p>
  
  <pre><code>pointcut addElementsToHashCodeSet() : call (* Set.add(..));
  
  declare warning: addElementsToHashCodeSet(): "pointcut: addElementsToHashCode()";
  
  after(): addElementsToHashCodeSet() { 
      monitorHashCode.addElementsToHashCode((MethodSignature)thisJoinPoint.getSignature());
  
  
  
  public void addElementsToHashCode(MethodSignature methodSignature) { 
      System.out.println("\naddElementsToHashCode.");
  
      // We need to access to real PARAMETER NAME
      // Then we will concatenate with method and full class name
      String firstParameterName = methodSignature.getParameterNames()[0];
      // Add firstParameterName to an array that will contain all 
      // the name of the collections inserted into the HasSet 
      System.out.println("\nfirstParameterName: "+firstParameterName);
  }
  </code></pre>
  
  <p><strong>Current output:</strong></p>
  
  <p>firstParameterName: arg0</p>
  
  <p><strong>What I need to have as output:</strong></p>
  
  <p>firstParameterName: c</p>
  
  <p><strong>I have this two options:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/lIdxr.png" alt="Java compiler options"></p>
  
  <p><img src="https://i.stack.imgur.com/lInmn.png" alt="AspectJ compiler options"></p>
  
  <p>What else do I have to activate?</p>
  
  <p>Thank you very much !</p>