Run your app using:
./gradlew bootRun --args='--spring.profiles.active=dev' --debug-jvm.
Then, in IntelliJ IDEA, create a Remote JVM Debug
configuration and run it.
Actually, this is the same process as debugging a Java Spring Boot application, so the current question might be a duplicate of how to debug spring application with gradle