I have an application that I deployed in tomcat. Later I configured the code as a project in Eclipse. I want to connect to the tomcat via eclipse and debug the application.
Trying to setup a remote debug connection is throwing up errors. Is there any entry that I need to add somewhere in tomcat?
I have an application that I deployed in tomcat. Later I configured the code
Share
First, you need to run Tomcat in debugging mode. The easiest way to do that is to modify the startup file (.bat or .sh depending if you are Windows or not). Find the line near or at the end of the file that contains the
startcommand, and change it tojpda start. This will cause Tomcat to start in debugging mode listening on port8000.Next, to connect to this process via Eclipse, select the
Runmenu and chooseDebug Configurations.... In the pane on the left, chooseRemote Java Applicationand click theNew launch configurationbutton above the list. The important settings to note are theHostandPortfields. The host value must match the hostname of the Tomcat process, and the port should be8000. You also might need to add entries on theSourcetab to ensure that all of the source code is available to step through.