简体   繁体   中英

How to debug java application in Eclipse deployed in tomcat?

I am working on an web application deployed in tomcat, the problem I am facing is neither it is allowing me to add to tomcat server nor it is allowing me to run on debug mode.

在此处输入图片说明

To debug an application running on an external tomcat, set that tomcat to allow remote debugging, eg with JVM params like this:

-agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n 

Then create a new remote "Remote Java Application" debug config, select connection type "Standard (Socket Attach)" and provide host and port (in the example above the port would be 8787).

To run and debug a Java web application in Eclipse, you need to have a dynamic web project. The error message in your screen shot implies you haven't one. Have a look at the excellent tutorials of Lars Vogel:

http://www.vogella.com/tutorials/EclipseWTP/article.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM