- This topic has 7 replies, 2 voices, and was last updated 19 years, 10 months ago by Riyad Kalla.
-
AuthorPosts
-
nedda76MemberHi all,
I am running into a debugging problem – perhaps due to lack of understanding of how myEclipse works with struts.
I am using the tomcat5 connector, I start up tomcat inside eclipse and hit breakpoints in my Action classes just fine but… I cannot step into methods which are implemented in helper classes that the Actions call.
I am using myEclipse 3.0.8.4, tomcat5 and struts 1.1 Tomcat is set to run in debug mode –
Do I need to do additional configuration steps to the tomcat connector paths?Any hints/clues/help woul be appreciated.
Thanks,
Nedda
Riyad KallaMemberNedda,
If you are trying to step into Struts code, then you need to download the Struts source code from struts.jakarta.org and attach it to your struts.jar file, then you’ll be able to step into it. Make sure you grab the right version of the source code (Struts 1.1).
nedda76MemberHi RK,
the code I am trying to step into is part of my struts project – these are some regular java classes (helpers if you will) that my Action classes call to do things like db and other tedious work. These helper classes are built, packaged and deployed together with the Action, Form, Bean and all other classes belonging to the project. The source code is all under the same directory com.xxx.etc
Riyad KallaMemberOh I see, yes you should be able to step into those withour problems.
1) Are you working with multiple projects here or just 1?
2) Are your ‘helper’ classes packaged in a JAR or are they part of the /src tree that is built into the /classes output directory under WEB-INF dir?
3) When you set a breakpoint IN your helper classes, do they get hit?
4) When you step from other code INTO your helper classes, what happens that “doesn’t work”?
5) Are you using a 1.4+ VM to launch Eclipse (using -vm argument) AND also to run your Java app?
nedda76MemberHi Ri9d,
1) I have one project, which has several packages – each one with its own struts configuration files.
2) My helper classes are part of the /src tree that is built into the /classes output under WEB-INF
So I have something like this:src/xyz/actions
src/xyz/forms
src/xyz/helpersand so on…
3) When I set a breakpoint in my helper classes they do not get hit
4) For example, I call a helper class method in one of my actions, set a break point on that line and on F5 it just executes and goes to next line – basically steps over.5) I am using 1.4VM to launch eclipse – I am not using -vm args – Here is a stupid qs: should I start up eclipse with -vm ?
Riyad KallaMemberI would suggest shutting down Tomcat, removing your deployment, rebuilding your entire project (Project > Clean) and then redeploying it and restarting Tomcat.
5) -vm is usually a good idea so you KNOW the version of VM running eclipse, just point it at the javaw.exe executable.
nedda76Memberhi Riyad,
i cleaned up tomcat, my build dir and eclipse setup and now everything works. Dunno what was wrong in the first place. Thanks for your help!!!
Nedda
Riyad KallaMemberGlad to hear it is working now Nedda.
-
AuthorPosts