• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

WebSphere IDE Tool - Debugging

 
annamalai murugesan
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
annamalai murugesan
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Dan Kehn
Dastardly Dan the Author
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic