[ACCEPTED]-Remote debug Jetty (no mvn, no plugins)-remote-debugging
This is what we are adding to our JBoss 4 command line while development:
Then we launch 3 the eclipse remote debugging and connection 2 to this port.
To run from jar (standalone) do 1 the following
java -Xdebug -Xrunjdwp:transport=dt_socket,address=8585,server=y,suspend=n -jar start.jar
For remote debugging you should use JPDA. There's 5 a sort of tutorialish article about it available 4 here.
In short, start your JVM with the argument:
and 3 you are able to connect to the underlying 2 JVM listening on port 8000 via the standard 1 Eclipse debugger.
If you will use mvn jetty:run one day, you have to
export MAVEN_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=n"
-Xdebug ... doesn't works
Using the JVM "agentlib" command-line parameter 6 before "start.jar" did not work for me, but 5 this does:
How to allow Eclipse to remotely 4 debug #Jetty (#JPDA #agentlib:jdwp) on port 3 8000
You have to create a file, $JETTY_BASE/start.ini (do not 2 change $JETTY_HOME/start.ini) and put the following two lines 1 in it:
More Related questions