This is a local-to-local debug setup, from an Eclipse instance to Tomcat on localhost.
I've tried starting tomcat from both /etc/init.d/tomcat6 start
and from /usr/share/tomcat6/bin/catalina.sh jpda start
(ie from the startup command and from CATALINA_HOME
command), no change in result.
The JAVA_OPTS
to Tomcat are
JAVA_OPTS="-Djava.awt.headless=true -Xmx256m -XX:+UseConcMarkSweepGC -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8888,server=y,suspend=n"
Eclipse project is a simple Scala Lift (2.8.1/2.3) web project generated from the default Lift Maven archetype (this has worked in debug before, so it's not the archetype's fault).
Eclipse Remote Debugging configuration is default, except port changed to 8888
. Source path includes project directory.
Maven is used for build/deploy, so a mvn clean
and mvn tomcat:redeploy
is done after breakpoints are set.
Remote Debug session is launched, connects to Tomcat as seen in screenshot.
Tomcat does seem to be in debug mode, as evidenced by catalina.out:
16:19:37.865 [http-127.0.0.1-8080-1] DEBUG comet_trace - AJAX Request: C8436967E450AD62D37654BBB3B5FCB9 Map(F27626326198LU12KZ -> List(foo), q -> List(f0), limit -> List(10), timestamp -> List(1306271977857))
16:19:37.866 [http-127.0.0.1-8080-1] DEBUG comet_trace - AJAX Response: C8436967E450AD62D37654BBB3B5FCB9 PlainTextResponse(,List(),200)
16:19:37.870 [http-127.0.0.1-8080-1] INFO net.liftweb.util.TimeHelper开发者_运维知识库s - Service request (GET) /bsa2/search/ajax_request returned 200, took 11 Milliseconds
16:19:44.312 [http-127.0.0.1-8080-1] DEBUG comet_trace - AJAX Request: C8436967E450AD62D37654BBB3B5FCB9 Map(F27626326198LU12KZ -> List(foo), q -> List(), limit -> List(10), timestamp -> List(1306271984133))
Web site is accessed with browser on the normal Tomcat URL (eg http://localhost:8080/test/cleanproject
).
No breakpoint is ever reached.
精彩评论