This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes IDEs, Version Control and other tools and the fly likes Debugging WebSphere 5.02 using Eclipse 2.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Debugging WebSphere 5.02 using Eclipse 2.1" Watch "Debugging WebSphere 5.02 using Eclipse 2.1" New topic
Author

Debugging WebSphere 5.02 using Eclipse 2.1

Bharat Ruparel
Ranch Hand

Joined: Jul 30, 2003
Posts: 493
I am using Eclipse 2.1 on a Solaris platform to debug a WebShere 5.02 appliation running on the same machine. I am using the Remote Debugging feature of Eclipse. I have the "Java Developer's Guide to Eclipse" Book written by Shavor, Anjou, Fairbrother, Kehn, Kellerman and mcCarthy. I am following the process described in this book to do the remote debugging.

Here is what I am running into:
The debugger attaches to the running program and suspends execution fine. I can put the break-points and see the "flow" of the program logic correctly. Only problem is: the local variables do not display in the variables window. I cannot evaluate them or display them using the Context sensitive menus either. It seems like some sort of setting problem. Is there is a switch of some sort that needs to be enabled to observe the local variable values?

Somthing very interesting happening here since my last post. The debugger displays the local variables/parameter values for those methods which are declared either private or protected. It does not display the local variables/parameters for those methods which are declared public. The class member variables are always shown however. This must be some sort of setting that I am missing. Any ideas anyone?

Any insights anyone might have will be greatly appreciated.

Thanks.

Bharat
[ June 10, 2004: Message edited by: Bharat Ruparel ]

SCJP,SCJD,SCWCD,SCBCD,SCDJWS,SCEA
Bharat Ruparel
Ranch Hand

Joined: Jul 30, 2003
Posts: 493
I am a little bit disappointed here since no one responded. I was hoping that one of the famed authors of the aforementioned book which I bought will be kind enough to shed some light on it, apparently not.

Anyway, I have discovered the solution to this problem researching on my own. I did a google search on "local variables unavailable" and it linked me into the following site:
www.myeclipseide.com
I searched their knowledgebase and found very useful information pertaining to the problem discussed above.

The gist of it is that our "Ant" build was not compiling with the debug symbolic information and therefore, the local variables were not being displayed. Eclipse, on the other hand, compiles with debug symbols by default. As soon as I copied over the Eclipse compiled class files on to the Ant compiled class files and restarted the Websphere server, it started showing the full debug information.

Moral of the story, make sure that you check the Ant build file. In version 1.5.x, Ant will or will not insert debug information in the compiled class file depending on whether you use the debug="true" or debug="on" flag in the "javac" task. In our build, we need to use debug="on" instead of debug="true". When in doubt, copy Eclipse compiled class files over the ant compiled files, things should work.

Bharat
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30138
    
150

Bharat,
That's interesting. When I had a problem with ant disabling the debug fields, I got an error when I tried to run about there not being any line numbers. It's good to know that shows up in different ways. Thanks for posting the solution.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Debugging WebSphere 5.02 using Eclipse 2.1
 
Similar Threads
Webspere 345 exam questions
Eclipse's debugger's behavior query
Debugging Container code in Eclipse
Is rt.jar debuggable in JDK6?
Issue w/ accesing file from a Servlet