0

My originally question has been marked as duplicate as this question and asked to ask a new one. So here I repeat, I am not looking for a remote debug solution. What I am asking is how to debug WAR inside eclipse just as a JAVA application. Following is my original question.

I have seen many online tutorial explaining how to use eclipse to do remote debug of WAR file.

But what I want to know is how to do the debug inside eclipse just as debugging a JAVA application? I have Tomcat 7 configured in my eclipse as a server. And I have tested it with a sample servlet program successfully meaning I can set breakpoint in the source code and run into it.

My WAR application is built by gradle. I have imported the gradle project into my eclipse and build it ok inside eclipse by running gradle task inside "gradle tasks view". I added the project into the server. However, when I try to use "Debug as > Debug on Server", it fails and the breakpoint is not get hit. Anyone could share the experience to debug WAR inside eclipse?

Max Li
  • 551
  • 2
  • 14
  • 1
    You say "it fails", how exactly does that look? Your next sentence implies that the application is running, but debugging is not working. Is that correct? – Joachim Sauer Aug 13 '20 at 09:03
  • Well, I am new to Eclipse J2EE. When I do "debug as... > debug on server" it fails with tons of messages. I guess the server starts failed. I set breakpoint inside the source code, and it never get hit. So I am not very sure is it server fails to start or the application fails (after server is up). – Max Li Aug 13 '20 at 09:13
  • "tons of messages" would be a good start. Some of them might tell you what went wrong ... If only there was some way for us to see those. – Joachim Sauer Aug 13 '20 at 09:21

0 Answers0