Ah yes changing to suspend=y makes it wait, thanks!
I then set a breakpoint in my build.gradle file in a task that I am running from commandline. But it never stops at the breakpoint when I launch the remote debug process from eclipse (socket Attach on port 5005).
Do I need to run the build with some special parameter?
Without special tooling support, you won’t be able to step through build scripts in the debugger. And from what I know, the Eclipse Gradle tooling doesn’t currently provide such support. You should be able to debug custom task classes and plugin classes though, as long as you make them known to the IDE.
‘project.javaexec’ creates a new process, so you’ll have to debug that process (and set the usual debug JVM args for it). To simplify this, you can do ‘javaexec { debug = true }’. For more information, see the DSL reference for ‘JavaExec’.