I’ve spent the past few weeks or so debugging issues with the interaction of two tomcat servers. Each tomcat server runs a separate app with its own code base, and interact with one another via web services. Typically, I run each app on a separate server, with ports altered on one so they don’t clash.
Of course there is a huge headache here when debugging. I only know how to launch Tomcat in debug mode with the following command:
catalina.sh jpda start
The server on which I run this command will open a debugging port at port 8000, but if I start both in debug mode, then the ports clash. So while debugging I’m perpetually bringing down both to start one in normal mode and one in debug, and then again to reverse them as I track an issue over the wire. It would save a great deal of time to simply start them both in debug mode on different ports, and connect the debugger to each as needed.
Is there an easy way to tell a Tomcat server to run its debug port on a port other than 8000?
Put the following in
(create the file if it does not exist and add the following).