Reputation: 3567
Here is the setup. I have a Gradle plugin that adds some tasks to the project based on your configuration. This task does a number of things, then builds the executable jar in your project and runs your jar. This works just fine when running the task.
However, if I select the Gradle task in the Intellij run configuration and hit debug, it obviously does not connect to the agent lib of the jar ran from the task.
Is there any way that I can instruct intellij to not attach to the Gradle task process and instead connect the jar that I run to it instead?
I need to run the jar from the plugin because the configs to start the jar with are in the Gradle config.
Upvotes: 0
Views: 245
Reputation: 401995
You can use JAR Application
run/debug configuration instead. To directly debug from Gradle the special support needs to be added to the IDE for this specific task, so a request is welcome.
Upvotes: 1