wood burning stoves 2.0*
The moose likes IDEs, Version Control and other tools and the fly likes WebSphere IDE Tool - Debugging Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "WebSphere IDE Tool - Debugging" Watch "WebSphere IDE Tool - Debugging" New topic
Author

WebSphere IDE Tool - Debugging

annamalai murugesan
Greenhorn

Joined: Jul 28, 2003
Posts: 18
Hi,
I am new to Java IDE Tool - WSAD(4.0), and in the process to understand the behaviour of WSAD debugging, wrote a simple Java application and ran it in debug mode. The program is supposed to print "Hello World". using System.out.println( "" ) function.
When i set the breakpoint at System.out.println(), the execution stops there and when i step-thru that, i am prompted with a dialog box(Source Attachment). And this dialog box asks for "archive variable path" and "root variable path".
I guess i need to set environment variables. How to by pass this dialog box? When i step-thru the line, i expect the excution to stop at after that as there is no more line. Need your help to solve this.
Thanks and regards,
Mukesh
Dan Kehn
Dastardly Dan the Author
Ranch Hand

Joined: Jun 11, 2003
Posts: 120
If the debugger steps into code for which it has no corresponding source, it prompts you to provide it. In the case of system calls, src.jar in your JRE contains the source.
Note: I've not used WSAD 4.0 for a long, long time, but I vaguely recall it is based on Eclipse 1.0 / WSWB 1.0 (Help > About > Plug-in Details would confirm). That reason alone would justify upgrading to 5.0, since the improvements between Eclipse 1.0 to 2.0 are too many to list.
Returning to your question, you can point it to your source in the debugger dialog. The variables it's referring to aren't environment variables, but classpath variables (Preferences > Java > Classpath Variables). They point to locations that are not part of the workspace. In Eclipse 2.x, JRE_SRC and JRE_SRCROOT are predefined and reserved (i.e., they are set based on the checked JRE in Preferences > Java > Installed JREs). Finally, in the Properties dialog for the reference to rt.jar for the project you're debugging, there should be a Java Source Attachment page where you can specify the location of src.jar.
Like I mentioned, the above may not be completely accurate because WSAD 4.0 is but a dim memory to me now... and 5.0 is fading fast, with the impending release of 5.1.
-- Dan


Co-author of <a href="http://www.jdg2e.com" target="_blank" rel="nofollow">The Java Developer's Guide to Eclipse</a>, 2nd Edition<br />(Yahoo group <a href="http://groups.yahoo.com/group/JDG2E/" target="_blank" rel="nofollow">JDG2E</a>)
annamalai murugesan
Greenhorn

Joined: Jul 28, 2003
Posts: 18
Thanks, Dan.
I am still working on that and trying to contact IBM. Will keep you updated of how this is fixed.
Thanks for your time.
Regards,
Muru
Amy Smith
Greenhorn

Joined: Jul 26, 2001
Posts: 24
The behavior you described is not a problem unless you want to step through JDK code. You can avoid it by stepping over (debugger arrow that is an arch) the JDK code instead of stepping into it (debugger downward arrow).
I use WSAD every day and I have never attached the JDK source because I don't want to look at it. When I get the message, I use the debugger return arrow(debugger up arrow) until I get back to my application code. So, I ignore the message.
I am not sure where the src.jar is that matches the IBM JDK, but that is what you would need to set in the dialog in order to step into the JDK code.
I found one src.jar in
C:\Program Files\IBM\Application Developer\plugins\com.ibm.etools.server.jdk.
No guarantee that it matches, but it is worth a try if you want to see the Sun/IBM code.
--Amy Smith


Amy Smith<br />Java Developer<br />Haworth, Inc.<br />amy.smith@haworth.com
Dan Kehn
Dastardly Dan the Author
Ranch Hand

Joined: Jun 11, 2003
Posts: 120
Good point. You can also specify what you never want to "step into": Go to Window > Preferences > Java > Debug > Step Filtering; it has the common package prefixes already listed (com.ibm.*, com.sun.*, java.*, etc) and you can add your own.
-- Dan
Sahil Singh
Ranch Hand

Joined: Sep 03, 2003
Posts: 41
Hi Guys,
I also have a related problem in WSAD4.0.3.
I am not able to see each line of my java file in debug mode.
Meaning the execution stops at the breakpoint but only the java-class file is opened blank...there is no Source-file where i can see the code i have written.....
Appreciate your response,
Thanks in advance..
Sahil
[ November 14, 2003: Message edited by: Sahil Singh ]
Howard Kushner
author
Ranch Hand

Joined: Sep 19, 2003
Posts: 361
Suggestion: Get a more current version of WebSphere Studio Application Developer! Version 4 was a good start, but being based on Eclipse version 1 has definite drawbacks. WSAD v5 is based on Eclipse v2 and WSAD v5.1 is based on Eclipse v2.1 and it keeps getting better. Version 5.x is much better than 4.x.
You can download free trial versions from IBM. If you are using it at work I would recommend you have a serious talk with your boss.
I will be happy to answer any additional questions you may have. I partcularly like your idea of starting your debugging with a simple Hello World app.
Regards,


Howard Kushner<br />IBM Certified Enterprise Developer - WebSphere Studio Application Developer V5.0<br />IBM Certified Advanced System Administrator - WebSphere Application Server V5.0<br />IBM Certified Solution Developer - Web Services with WebSphere Studio V5.1<br /><a href="http://www.amazon.com/exec/obidos/tg/detail/-/1931182108/" target="_blank" rel="nofollow">Developing J2EE Applications with WebSphere Studio</a> my Certification Study Guide for IBM Test 287
 
GeeCON Prague 2014
 
subject: WebSphere IDE Tool - Debugging