For my setup (Gradle 8.8 + IntelliJ 2024.2.1 + Windows 10), the options proposed by RockandRoll do not work. What works is to right-click in the source code and choose "Compile and Reload file" (application needs to be running in debug mode for this option to appear).