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"dmitriy.novozhilov
09/21/2023, 1:53 PMdo 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 PMJustin Tullgren
09/21/2023, 2:09 PMJustin Tullgren
09/21/2023, 2:10 PMdmitriy.novozhilov
09/21/2023, 2:13 PM--no-daemon
?Justin Tullgren
09/21/2023, 2:13 PMJustin Tullgren
09/21/2023, 2:14 PMdmitriy.novozhilov
09/21/2023, 2:14 PMdmitriy.novozhilov
09/21/2023, 2:15 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
Justin Tullgren
09/21/2023, 2:16 PMJustin Tullgren
09/21/2023, 2:16 PMdmitriy.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 PMJustin Tullgren
09/21/2023, 2:23 PMJustin Tullgren
09/21/2023, 2:23 PMDmitri Sh
05/02/2024, 12:10 AMJustin Tullgren
05/02/2024, 12:11 AMinkotlin.compiler.execution.strategy=in-process
gradle.properties
Justin Tullgren
05/02/2024, 12:12 AMJustin Tullgren
05/02/2024, 12:12 AMJustin Tullgren
05/02/2024, 12:13 AMDmitri Sh
05/02/2024, 12:18 AMDmitri Sh
05/02/2024, 2:15 AMwasyl
05/02/2024, 7:51 AMexecute gradle task
action, typing a task and running it with shift
pressed — the title window will change to debug
and IJ will run Gradle task and attach to Gradle daemon right awayDmitri Sh
05/02/2024, 11:45 PMJustin Tullgren
05/03/2024, 4:13 PMJustin Tullgren
05/03/2024, 4:14 PMJustin Tullgren
05/03/2024, 4:17 PMDmitri Sh
05/03/2024, 11:32 PM