-
Notifications
You must be signed in to change notification settings - Fork 0
Debugging tips
adding -Dorg.gradle.debug=true
to JAVA_OPTS will make gradle do the equivalent of
adding -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005 to the JVM command line and will suspend the virtual machine until a debugger is attached
e.g. the extremely primitive jdb -attach 5005
one issue with doing the above is that it seems to countermand the org.gradle.daemon=false
directive, noting that:
To honour the JVM settings for this build a single-use Daemon process will be forked. See >https://docs.gradle.org/6.8.1/userguide/gradle_daemon.html#sec:disabling_the_daemon. Daemon will be stopped at the end of the build
maybe there is some way of avoiding this but the consequent memory limitations of the daemon can be handled by setting e.g.:
org.gradle.jvmargs=-Xmx48g -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
(probably only the first bit really needed, the rest I just copped from StackOverflow)