Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » [RESOLVED]Unable to stop at breakpoint during remote debug session(Setting a break point in source java code does not stop a remote process)
[RESOLVED]Unable to stop at breakpoint during remote debug session [message #1454174] Tue, 28 October 2014 03:14 Go to next message
Jim Anderson is currently offline Jim AndersonFriend
Messages: 109
Registered: October 2014
Senior Member
This is the first time that I am running a remote process in a tomcat 7 container. I am trying to debug my server side code by single stepping through the java code. I am using the Luna release that I downloaded as 'eclipse-jee-luna-SR1-linux-gtk-x86_64.tar.gz'. I am running java 1.8.

I have a project defined that includes the source code for my server side. The code compiles cleanly in Eclipse with no errors. I followed the following steps in my attempt to stop the debugger at a break point.

1) In my tomcat7 bin, I have added the file setenv.sh with the following line of code:
export JAVA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"

2) In Eclipse, I have gone to run-->Debug Configurations and created a configuration with the following field entries:
name: serverSide
project: ps
connection type: standard (socket attach)
host: local
port: 8787

3) I started tomcat7 with .../tomcat7/bin/startup.sh

4) In the debug perspective, I opened up the java class where I have a problem and I set a break point in the first line of the method where the problem exists.

5) I selected Run-->Debug Configuration-->serverSide ['serverSide' is the name of the launch configuration]-->Debug.

After clicking on the Debut button, the 'Debug Configurations' window is dismissed and I am in the debug perspective window [attachment: 'debug_perspective_jimAnderson.jpg] . At the top of that window, the 'disconnect' button lights up, implying that connection has been made with the tomcat server. I also see the threads which are shown in the 'threads_jimAnderson.jpg' file, where the panel showing the threads is maximized. The design perspective also shows that the break point has been set.

6) In my web browser, I enter the URL for my application and start it up. I then navigate to the window in my application where the problem exists and I execute the problem code. At this point, I expect the debugger to stop at the break point, but this does not happen. Note that the java source code of the class which has the break point set, is compiled with the javac -g option.

My question is why doesn't the debugger stop at the break point?

Jim A.

[Updated on: Thu, 30 October 2014 04:45]

Report message to a moderator

Re: Unable to stop at breakpoint during remote debug session [message #1455231 is a reply to message #1454174] Wed, 29 October 2014 06:33 Go to previous messageGo to next message
Sarika Sinha is currently offline Sarika SinhaFriend
Messages: 131
Registered: February 2010
Location: Bangalore, India
Senior Member
Have you referred to
http://wiki.apache.org/tomcat/FAQ/Developing

Looks like you have missed jpda option
You can also go through :
http://stackoverflow.com/questions/3835612/remote-debugging-tomcat-with-eclipse


Sarika Sinha
JDT Programmer
Re: Unable to stop at breakpoint during remote debug session [message #1456166 is a reply to message #1455231] Thu, 30 October 2014 04:44 Go to previous message
Jim Anderson is currently offline Jim AndersonFriend
Messages: 109
Registered: October 2014
Senior Member

Sarika,

That did it! Thank you so much. I have put a lot of time trying to get this to work and now I am there. I had seen the documentation about setting the value of the JVM options to:

Quote:
JPDA_OPTS="-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n"


but I had not seen the part:

Quote:
catalina.sh jpda start


With these changes, I can not hit my break points in Eclipse.

Best regards,
Jim
Previous Topic:Unable to produce a simple while loop outcome.
Next Topic:Windows UI Scaling and eclipse
Goto Forum:
  


Current Time: Thu Mar 28 21:19:41 GMT 2024

Powered by FUDForum. Page generated in 0.02225 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top