I am working on spring app and need to step through a controller method to see how it works. I am working in eclipse and building my app with gradle bootRun
command.
How to run it in debug mode?
i tried gradle bootRun --debug
but it's just debug log, not debug mode
i tried gradle help --task bootRun
-- this gives me info about task there i saw --debug-jvm
option but when i run gradle bootRun --debug-jvm
application doesn't start
Configure with Project -> Debug as… -> Debug Configuration -> Remote Java Application. As host set localhost, and port 5005. After click DEBUG button, debugging mode will attach to 5005, and Gradle will continue to launch application.
In Eclipse, from the toolbar, select Run -> Debug Configurations -> select Remote Java Application -> click the New button -> select as Connection Type Standard (Socket Attach), as Host localhost, and as Port 8002 (or whatever you have configured in the steps before). Click Apply and then Debug.
After you run gradle bootRun --debug-jvm
the application is suspended until you connect your debugger to the port it is listening on (port 5005).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With