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:
My XXXIssueRegistry
To debug a custom lint check you need to run a Gradle lint task with -Dorg.gradle.debug=true
parameter, for example:
./gradlew --no-daemon -Dorg.gradle.debug=true lintDebug
The Gradle will stop execution until a debugger is attached.
Attach a debugger to a local process:
And select a corresponding Java process:
After debugger has been attached, the Gradle will continue execution and you will able to debug your custom lint rule: