-1

I am working on a project where the backend code is in Java. I want to debug this code and am running tomcat in the debug mode correctly .

I have the Java code in Eclipse where I set up a new debug config for Remote Java Application and start the debugging.It shows no error but it is not breaking at the breakpoint.

So the Tomcat Webapps folder has only a copy of the Servlet classes and my Java code is in a folder at some other place.

Is this the reason that I am not being able to link them properly

4
  • When you start debug in eclipse, do you switch to debug mode and see the task running? Is your code in tomcat up-to-date from your java code?
    – Alfabravo
    Feb 17, 2012 at 19:17
  • yepp..i can see Server VM running in debug mode..i think i am putting breakpoint in wrong place.how do i get the origin place where the server starts?Is it the HTTPServlet class.
    – code4fun
    Feb 17, 2012 at 19:40
  • 1
    why did someone vote a -1 for this question?
    – code4fun
    Feb 17, 2012 at 20:05
  • because it is off topic, this is more for programmers, stackoverflow expects questions specific for implementatation issues, try the FAQ (I did not downvote) Jul 17, 2012 at 21:38

2 Answers 2

1

You have to start tomcat with the JPDA options in order to debug remotely. Under *nix, issue "catalina jpda start" instead of "catalina start".

0

If you want to do a remote debug to figure out a problem in code, then your code locally must be the same. Also remember to connect to the correct port, 8000, I believe.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.