0

I have IntelliJ 2022.1 CE, Gradle 7.4.2, and Java 11. I'm working on a Gradle task, and I want to put a breakpoint in the task. JetBrains' documentation says this is perfectly doable, but I can't get it to stop at the breakpoint. The task is as follows:

task effectiveProperties() {
    doLast {
        if (project.hasProperty("profile")) {
            def defaultConfig = new YamlSlurper().parse(file("src/main/resources/application.yml"))
            def profileConfig = new YamlSlurper().parse(file("src/main/resources/application-${profile}.yml"))

            println "got there"
        }
    }
}

I have a breakpoint set at the second def. I do see the log, so I know execution is passing where the breakpoint is. What is going wrong?

spartanhooah
  • 183
  • 4
  • 15
  • 2
    Reported an [issue](https://youtrack.jetbrains.com/issue/IDEA-293464/Gradle-Script-debug-does-not-work). Try using 2021.3 version from https://www.jetbrains.com/idea/download/other.html Does it work? – Andrey May 04 '22 at 10:21
  • Yup, sure enough, 2021.3 works. Thanks for reporting that and pointing me to a working version! – spartanhooah May 04 '22 at 23:41

0 Answers0