Answering your 3rd question
In the troubleshooting the part under remote debugging should work just fine:
https://docs.gradle.org/current/userguide/troubleshooting.html#sec:troubleshooting_build_logic
Also a blog post on medium
And some discussion on the forum:
Basically you need to
- Start the host (code containing plugin source) in remote debugging state, which will wait and listen that the client executes Gradle tasks
- Start the application that will send events to specific host/port or memory location that the host will pick up and will be able to debug the plugin code that way.
I agree that it would be the best way if you could actually see the whole process. Maybe I can make a recording of debugging as an example so you can see all of the steps. I suppose you are using IntelliJ.
Is plugin
A) binary plugin? totally separated project or
B) are you having a precompiled plugin in a buildSrc directory in the same project?
Would there be any chance that you could share the code?