How to run Jetty via Gradle in Debug Mode

后端 未结 9 1481
醉话见心
醉话见心 2020-12-13 00:43

Does anyone know how to configure the jetty gradle plugin to run in debug mode so that I can attach a remote debugger?

I\'ve tried setting the gradle and java opts t

9条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-13 00:59

    I ran it with org.gradle.debug property:

    ./gradlew -Dorg.gradle.debug=true jettyRun

    At this point gradle freezes and waits for incoming debug connections.

    Then I created Remote Run configuration in IntelliJ with value of "Command line arguments for running remote JVM" to be -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005

    Finally, I ran this new configuration, gradle resumed progress and IDE stopped at the first breakpoint.

提交回复
热议问题