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 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]