How to debug java source code when I implement a custom Detector for Lint? : <p>I am a Android developer.
I have already design my own lint rules by implementing new XXXDetector and XXXIssueRegistry, here is my source code snip:</p>

<p>My XXXIssueRegistry file:</p>

<pre><code>public class MyIssueRegistry extends IssueRegistry {
  @Override
  public List&lt;Issue&gt; getIssues() {

    System.out.println("!!!!!!!!!!!!! ljf MyIssueRegistry lint rules works");
    return Arrays.asList(AttrPrefixDetector.ISSUE,
            LoggerUsageDetector.ISSUE);
  }
}
</code></pre>

<p>My XXXDetector file:</p>

<pre><code>public class LoggerUsageDetector extends Detector
    implements Detector.ClassScanner {
public static final Issue ISSUE = Issue.create("LogUtilsNotUsed",
        "You must use our `LogUtils`",
        "Logging should be avoided in production for security and performance reasons. Therefore, we created a LogUtils that wraps all our calls to Logger and disable them for release flavor.",
        Category.MESSAGES,
        9,
        Severity.ERROR,
        new Implementation(LoggerUsageDetector.class,
                Scope.CLASS_FILE_SCOPE));

@Override
public List&lt;String&gt; getApplicableCallNames() {
    return Arrays.asList("v", "d", "i", "w", "e", "wtf");
}

@Override
public List&lt;String&gt; getApplicableMethodNames() {
    return Arrays.asList("v", "d", "i", "w", "e", "wtf");
}

@Override
public void checkCall(@NonNull ClassContext context,
                      @NonNull ClassNode classNode,
                      @NonNull MethodNode method,
                      @NonNull MethodInsnNode call) {
    String owner = call.owner;
    if (owner.startsWith("android/util/Log")) {
        context.report(ISSUE,
                method,
                call,
                context.getLocation(call),
                "You must use our `LogUtils`");
    }
}
}
</code></pre>

<p>Now I can run my custom lint rules by runnig command:</p>

<pre><code>$gradle lint
</code></pre>

<p>And I will get output message like I expected in console.</p>

<p>But I want to debug my XXXDetector source file. How can I do that?
If I click "debug" or "run" or "build" , my custom lint rules will NOT run! So I have to run it in console, which don't support debug.
How can I solve this?</p>
