This is a guide for the Eclipse configurations in order to debug a webapp deployed to Jetty introduced as a Maven plugin. The setup has been described to this article.
Since we don’t use the Eclipse WTP tooling system to our advantage, there is a bit of manual work so that to setup the parameters and debug the webapp remotely.
First we need to setup the maven goal:
to be remote debugging-aware. To do so we go to “External Tools > External Tools Configuration”, creating a new configuration setting and setting the “Location:” section to the full path of the
executable. The “Working Directory” needs to point to our Eclipse project. As an argument we are setting:
Finally in the “Environment” tab we need to setup the followings as variable/value:
MAVEN_OPTS / -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=y
Finally we need to setup a new “Debug > Debug Configurations.. > Remote Java Application” configuration setting, pointing to our project and making sure the port is set to 4000 to match the setting we’ve specified above.