[RESOLVED]Unable to stop at breakpoint during remote debug session [message #1454174] |
Mon, 27 October 2014 23:14  |
Eclipse User |
|
|
|
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 00:45] by Moderator
|
|
|
|
Re: Unable to stop at breakpoint during remote debug session [message #1456166 is a reply to message #1455231] |
Thu, 30 October 2014 00:44  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.04628 seconds