3

I created new Java project in IntelliJ IDEA with gradle (and added one class which prints hello world). Then I try to run project both in debug and non-debug modes.

When I first time run in non-debug mode, IntelliJ prints that new daemon was started, and on subsequent launches this daemon is reused.

But when I run in debug mode, IntelliJ prints that new daemon was started each time (both first one, and subsequent ones).

How can I make IntelliJ to reuse gradle daemon when running in debug mode?

(I have gradle 5.2.1 and IntelliJ 2019.3.3)

diralik
  • 6,391
  • 3
  • 28
  • 52
  • 3
    Currently new daemon instance is always created on debugging.There is related discussion on YouTrack: https://youtrack.jetbrains.com/issue/IDEA-228584 – y.bedrov Feb 24 '20 at 08:13
  • @y.bedrov thank you! So the solution is to disable "Enable Gradle script debugging" in run configuration. Would you mind writing an answer? – diralik Feb 24 '20 at 09:33
  • Disabling "Enable Gradle script debugging" did nothing for me. Gradle continues to spawn a new daemon every run. https://youtrack.jetbrains.com/issue/IDEA-234680 – EntangledLoops Mar 13 '20 at 04:18

1 Answers1

3

You may disable "Enable Gradle script debugging" option in run configuration. Related issue on YouTrack: https://youtrack.jetbrains.com/issue/IDEA-228584

y.bedrov
  • 5,318
  • 3
  • 22
  • 19
  • Unfortunately this workaround works only in 2019.3.3 (and not works in 2019.3.4 or 2020.1 Beta) – diralik Mar 19 '20 at 00:40