I want to debug a Spring boot application with IntelliJ. I'm using windows 10. when I run my spring boot project with following command it works fine. But debugging not working.
mvn spring-boot:run -Drun.profiles=dev -Dspring-boot.run.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"
And then I make a remote debugger with intelliJ as follows.
but when I click the debug button intelliJ shows following message.
Error running 'RemoteDeBugger': Unable to open debugger port (localhost:5005): java.net.ConnectException "Connection refused: connect
What is the reason for above behavior and how to do debugging correctly.