tomcat6 needs debug start mode with jpda
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tomcat6 (Ubuntu) |
Fix Released
|
Wishlist
|
Thierry Carrez |
Bug Description
Binary package hint: tomcat6
I had filed this in the wrong place, but I don't see any links to it now. Apologies if it's a dup.
Bits and pieces pasted here from different sources but it all describes the prob.
tomcat 6 in jaunty:
dpkg -l | grep tomcat6
ii libtomcat6-java 6.0.18-0ubuntu6 Servlet and JSP engine -- core libraries
ii tomcat6 6.0.18-0ubuntu6 Servlet and JSP engine
ii tomcat6-admin 6.0.18-0ubuntu6 Servlet and JSP engine -- admin web applications
ii tomcat6-common 6.0.18-0ubuntu6 Servlet and JSP engine -- common files
ii tomcat6-user 6.0.18-0ubuntu6 Servlet and JSP engine -- tools to create user instances
I've installed the stock tomcat6 package on Intrepid, and I want to
configure it for remote JPDA debugging (listening on port 8000) for
debugging a webapp from eclipse. The normal way to do this is to edit
/usr/share/
exec "$PRGDIR"
However, the Ubuntu system startup script doesn't seem to follow the
normal tomcat6 startup procedure. /etc/init.d/tomcat6 runs /usr/bin/jsvc
instead of executing the normal startup scripts in
/usr/share/
DAEMON=
.
.
.
$DAEMON -user "$TOMCAT6_USER" -cp "$JSVC_CLASSPATH" \
-outfile SYSLOG -errfile SYSLOG \
-pidfile "$CATALINA_PID" $JAVA_OPTS "$BOOTSTRAP_CLASS"
How should I configure it to start the debugger?
The attached patch is crude way of accomplishing this. I'm sure there are better ways.
Changed in tomcat6 (Ubuntu): | |
assignee: | nobody → Thierry Carrez (ttx) |
status: | Triaged → In Progress |
Passing arbitrary Java options is supported through setting JAVA_OPTS in /etc/default/ tomcat6. .. transport= dt_socket, address= 8000,server= y,suspend= n -Djava. awt.headless= true -Xmx128M"
So if you set:
JAVA_OPTS="-Xdebug -Xrunjdwp:
You should get desired behavior.
We could modify the init script so that JPDA_DEBUG becomes an option in /etc/default/ tomcat6.
Setting this to Wishlist.
Please also note that the tomcat6-user package allows to set up private instances which sound more appropriate for development/ debugging.