On Mar 29, 2006, at 12:47 PM, Pascal Alberty wrote:
Add the following parameters to the tomcat JAVA_OPTIONS
-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
In Eclipse, create a new "Java Remote Application". By default, port
used will be 8000 as configured previously.
Launch Tomcat, run this "JRA", place breakpoints, use your web
application. Eclipse will go in debug mode if breakpoints are meet.
See http://tomcat.apache.org/faq/development.html for more
explanations.
Pascal
That's the page I followed in getting it set up. I started tomcat
with those environment options and, with my project open, attached to
the running tomcat instance. I set my breakpoints, and triggered the
web app, but it didn't stop at the breakpoints. In the log output for
tomcat, the first line is "Listening for transport dt_socket at
address: 8000".
On Mar 29, 2006, at 1:17 PM, Mark Thomas wrote:
The project that contains your servlets needs to be part of the
project that is associated with the debug session for Tomcat.
Mark
I used maven's eclipse plugin to generate an Eclipse .project file.
I've opened that in Eclipse and then created the "Remote Java
Application" for debugging, and selected the project in the Connect
tab. Do I need to compile the WAR from within Eclipse? I checked the
compile settings for Maven, and it is building with Debug on in the
generated class files.
Mark
On 3/29/06, Mark Slater <[EMAIL PROTECTED]> wrote:
I'm using Eclipse to try and debug a servlet in tomcat. I've got
eclipse set up so that it starts and stops tomcat in debug mode (I
can tell because the list of tomcat threads is visible and updated
when I'm using the debug perspective). I added a few breakpoints to
my code and triggered the servlet, but the breakpoints didn't pause
the execution. I know the functions were hit because I've got stack
traces being logged with exceptions (they're the reason I'm trying to
debug in the first place).
I'm not using Eclipse to build or deploy my webapp, but I do want to
be able to use it to debug. I have maven building the war and I
deploy the webapp by hand (ie cp target mywebapp.war TOMCAT_HOME/
webapps/). I used the eclipse plugin for maven to generate
the .project and .classpath files that eclipse is using when I browse
my source code. What can I do so that I can also debug it?
Thanks!
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Pascal Alberty
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]