I have created a web app using maven in eclipse. I am using jetty for running the app. I am able to run the app using the maven jetty plugin. But I am facing difficulty while debugging the app - The steps that i have followed to setup debug settings are from the below link http://www.clickonchris.com/2010/05/configuring-jetty-maven-and-eclipse-together-with-hot-deploy/
I can run the app at port 8080 and it keeps on Listening for transport dt_socket at address: 4000. For debugging i have given port 4000. But when i start the debugger in eclipse it gives me a window with following error - "Failed to connect to remote VM. Connection refused. Connection refused: connect" Can some one help me out in resolving this issue for debugging the app.
Thanks!!!
Running the Web ApplicationSelect the application you want to run on Jetty. Click on the Run button -> Run Configurations. Configure your app on Jetty as shown in the picture bellow and click on Run: Wait for the server to start.
Set MAVEN_OPTS using -
export MAVEN_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"
Then start jetty using -
mvn jetty:run
Start remote debugging from your fav IDE on port 8000
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