For me, in IntelliJ 2024.2.1 with the settings shown by @derkoe, IntelliJ does not detect changes in the source code automatically and does not ask to rebuild and reload the classes. However, I can trigger it manually by right-clicking in the source code and choosing "Compile and Reload file" (application needs to be running in debug mode for this option to appear).