In bash console of Ubuntu execute following arguments.
Apache tomcat debugging mode
export JPDA_ADDRESS=8000
export JPDA_TRANSPORT=dt_socket
bin/catalina.sh jpda start
Done!
User can remotely connect through the port 8000 for debug the application!
Jetty debugging mode
Jetty server can start through maven plugin.So in order to enable remote debugging in jetty user can follow the following way.
Just two steps.
step 1
export MAVEN_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE - Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"
step 2
mvn jetty:run
Done!
Server listen on port 8000 until debugging client connecting to the server.
Simple as that!
This comment has been removed by the author.
ReplyDeletehi Harsha,
ReplyDeleteIn case if you have already configured MAVEN_OPTS, this will completely change the variable for that instance.so its better to append the debugging options to the variable as follows.
export MAVEN_OPTS=$MAVEN_OPTS [options you want to add].
mvn jetty:run -DargLine="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"
ReplyDelete