suspend = y
, if you want that application waits the debbuger to start.
address = 5005
or number
, the remote debugger port.
java -jar:
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 MyApplication
Maven:
mvn .. -Drun.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"
Mvn spring-boot:run
mvn spring-boot:run -Dspring-boot.run.jvmArguments="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000"
Gradle:
gradle .. --debug-jvm
bootRun {
systemProperties = System.properties
}
gradle bootRun -Dagentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000