Justin Tullgren
09/21/2023, 1:48 PMNick Chong
09/21/2023, 1:49 PMdmitriy.novozhilov
09/21/2023, 1:51 PM./gradlew -Dkotlin.daemon.jvm.options="-agentlib:jdwp=transport=dt_socket\\,server=n\\,suspend=n\\,address=5005" taskToRun
And to attach debugger you need to create and start the following run configuration int the IDEJustin Tullgren
09/21/2023, 1:53 PMdmitriy.novozhilov
09/21/2023, 1:53 PMserver=n
to server=y
in the spell and change debugger mode in the configuration to "Attach to remote JVM"do i need to start the gradle process in debug mode too?No, you don't
Justin Tullgren
09/21/2023, 1:54 PMdmitriy.novozhilov
09/21/2023, 1:55 PMalias gdwDebugS='./gradlew --stop && ./gradlew -Dkotlin.daemon.jvm.options="-agentlib:jdwp=transport=dt_socket\\,server=n\\,suspend=n\\,address=5005" '
Justin Tullgren
09/21/2023, 1:55 PMdmitriy.novozhilov
09/21/2023, 1:57 PMJustin Tullgren
09/21/2023, 1:58 PMdmitriy.novozhilov
09/21/2023, 2:13 PM--no-daemon
?Justin Tullgren
09/21/2023, 2:13 PMdmitriy.novozhilov
09/21/2023, 2:14 PMserver=y
and suspend=y
In this case kotlin daemon should suspend until you attach the debugger (or fail one minute later and fallback to no-daemon mode)Justin Tullgren
09/21/2023, 2:15 PMdmitriy.novozhilov
09/21/2023, 2:16 PMJustin Tullgren
09/21/2023, 2:16 PM╰─➤ ./gradlew -Dkotlin.daemon.jvm.options="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005" :thunderhead-apps:app-compose-ui:clean :thunderhead-apps:app-compose-ui:build
dmitriy.novozhilov
09/21/2023, 2:17 PM./gradlew --stop
?Justin Tullgren
09/21/2023, 2:17 PMwasyl
09/21/2023, 2:17 PMkotlin.compiler.execution.strategy=in-process
in gradle.properties
and running the Gradle task from IJ with shift pressed (it switches to debugging; execute gradle task
action, type task, shift + enter). I was able to successfully stop in an Anvil plugin this waydmitriy.novozhilov
09/21/2023, 2:18 PMJustin Tullgren
09/21/2023, 2:19 PM