Debug with Eclipse and Tomcat

Run Tomcat in debug mode

./ jpda start

# or (interactive mode)
./ jpda run

Create new debug configuration in Eclipse

  • set breakpoint(s)
  • Run -> Debug... -> create “Remote Java Application” connecting to port 8000


  • load a page of your webapp in your browser
  • go back to Eclipse and take control

Note: modifications to the Java code will take effect instantaneously!



You should also set your environment variables JPDA_ADDRESS=8000 and JPDA_TRANSPORT=dt_socket before using ./ jpda start.
Ramya K
Jun 14, 2010