Checkout IntelliJ IDEA Debug documentation.
Alternatively, you can run your app with –debug-jvm flag and then attach a remote debugger to it.
In order to attach IntelliJ as a remote debugger. First create remote configuration:
Then you can ./gradlew bootRun –debug-jvm in a external terminal or the terminal inside IntelliJ and then debug the remote configuration and you will be able to debug it inside IntelliJ.