Book a Demo

Author Topic: How to setup debugger to Generate Sequence Diagrams?  (Read 5004 times)

Taz

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
  • Imagine, sun, beach and financial freedom
    • View Profile
How to setup debugger to Generate Sequence Diagrams?
« on: May 01, 2008, 10:09:46 pm »
I want to generate Sequence Diagrams from my code which apparently is supported but I have difficulties setting up all the required build scripts. I assumed that using the Eclipse PlugIn it wouldn't be necessary to go down having to manually configure all the java settings, but apparently, i was wrong.  I looked through the help files and found some instructions, but even with them I couldn't get it to work yet.  For example for the build script it only gives an example for Visual Studio to point to the solution file. What is the equivalent for Eclipse or do I have to use the java build.  For the Test Command I managed to get it working eventually by adding all classpathes (but I'm not sure if that should not be entered somewhere else).  For run it only said "Customer". I assume that is the class name but having a more complex class structure "com.p1.p2.p3.Customer" I'm not sure if I put the whole class structure in there or what else.   And for Debug I followed the example (jre=C:\Program Files\Java\jdk1.6.0_05) but am stuck with the class path as i don't understand why in the example it says "-Djava.classpath=%classpath1603%;C:\benchmark\java\example1". is %classpath1603% something I have to set up in my environment.  I tried to enter the classpathes as I added them for "test", but when trying to run it, I keep on getting the following error: "Please configure JRE variable in package".  

Here is what I entered so far:

Build:

C:\Eclipse\IDE\eclipse.exe "C:\Dev\workspaces\P1 Platform\build.xml"

Test:

java -classpath .;./lib;./config;./lib/commons-collections-3.2.jar;./lib/commons-configuration-1.3.jar;./lib/commons-lang-2.3.jar;./lib/commons-logging-1.1.jar;./lib/jtds-1.2.jar;./lib/log4j-1.2.14.jar;./lib/serializer.jar;./lib/xalan.jar;./lib/xercesImpl.jar;./lib/xml-apis.jar;./lib/tar.jar;./lib/poi-3.0.2-FINAL-20080204.jar;./lib/poi-contrib-3.0.2-FINAL-20080204.jar;./lib/poi-scratchpad-3.0.2-FINAL-20080204.jar;./lib/commons-dbcp-1.2.2.jar;./lib/commons-pool-1.4.jar;./bin; com.p1.p2.reporting.RunReport ".\config\config.xml"

Run

com.p1.p2.reporting.RunReport

Debug

com.p1.p2.reporting.RunReport ".\config\config.xml"

run time variables:

jre = C:\Program Files\Java\jdk1.6.0_05,-classpath .;./lib;./config;./lib/commons-collections-3.2.jar;./lib/commons-configuration-1.3.jar;./lib/commons-lang-2.3.jar;./lib/commons-logging-1.1.jar;./lib/jtds-1.2.jar;./lib/log4j-1.2.14.jar;./lib/serializer.jar;./lib/xalan.jar;./lib/xercesImpl.jar;./lib/xml-apis.jar;./lib/tar.jar;./lib/poi-3.0.2-FINAL-20080204.jar;./lib/poi-contrib-3.0.2-FINAL-20080204.jar;./lib/poi-scratchpad-3.0.2-FINAL-20080204.jar;./lib/commons-dbcp-1.2.2.jar;./lib/commons-pool-1.4.jar;./bin

Any help greatly appreciated,

Thanks

Martin Terreni

  • EA User
  • **
  • Posts: 672
  • Karma: +0/-0
  • Sorry, I can't write
    • View Profile
Re: How to setup debugger to Generate Sequence Diagrams?
« Reply #1 on: May 01, 2008, 11:33:25 pm »
I don't think I kow the answer, but just for curiosity- do you have Eclipse integration or link?
Recursion definition:
If you don’t understand the definition read "Recursion definition".

Taz

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
  • Imagine, sun, beach and financial freedom
    • View Profile
Re: How to setup debugger to Generate Sequence Diagrams?
« Reply #2 on: May 01, 2008, 11:46:06 pm »
Yes I have the latest Eclipse Integration Plugin. That's why I hoped that this would take care of all these low level details.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: How to setup debugger to Generate Sequence Diagrams?
« Reply #3 on: May 02, 2008, 08:28:35 am »
No, the current versions Eclipse Link and Eclipse Integration do not assist in setting up build/run/debug scripts.

Edit: That isn't to say it wouldn't be a worthy feature request.  My personal opinion is that would be great as these can sometimes be difficult to set up.
« Last Edit: May 02, 2008, 08:34:38 am by simonm »

Taz

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
  • Imagine, sun, beach and financial freedom
    • View Profile
Re: How to setup debugger to Generate Sequence Diagrams?
« Reply #4 on: May 02, 2008, 08:00:29 pm »
Yes, it definately would be a worthy feature. There seems to be a lot of power in EA but tapping into it isn't always the easiest thing.  However, it would help if the documentation would show a little bit more detailed instructions on these difficult bits, especially more examples/screenshots. At the moment it's a bit patchy, they are there sometimes and then not there when it is crucial (at least for somebody like me who doesn't like to spend hours over documentations trying to figure them out ;-)).  Anyway, this isn't helping me at the moment. Any idea as to what I did wrong?

Taz

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
  • Imagine, sun, beach and financial freedom
    • View Profile
Re: How to setup debugger to Generate Sequence Diagrams?
« Reply #5 on: May 03, 2008, 12:37:35 am »
After trying various things I eventually mangaged to get the 'debug' tab somewhat configured, but I still have problems.  I get the following error in my Output Window:

"Failed to locate source file for class Lcom/p1/p2/reporting/RunReport"

First I don't understand, where the "L" comes from. Should be "com/p1..."
Second, how do I specify where to look for the source files?




Debug
(Application (Enter Path)
 com.p1.p2.reporting.RunReport

(Enter any runtime variables below)
jre=C:\Program Files\Java\jdk1.6.0_05\jre\bin\client,-Djava.class.path=.;./lib;./config;./lib/commons-collections-3.2.jar;./lib/commons-configuration-1.3.jar;./lib/commons-lang-2.3.jar;./lib/commons-logging-1.1.jar;./lib/jtds-1.2.jar;./lib/log4j-1.2.14.jar;./lib/serializer.jar;./lib/xalan.jar;./lib/xercesImpl.jar;./lib/xml-apis.jar;./lib/tar.jar;./lib/poi-3.0.2-FINAL-20080204.jar;./lib/poi-contrib-3.0.2-FINAL-20080204.jar;./lib/poi-scratchpad-3.0.2-FINAL-20080204.jar;./lib/commons-dbcp-1.2.2.jar;./lib/commons-pool-1.4.jar;./bin


Taz

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
  • Imagine, sun, beach and financial freedom
    • View Profile
Re: How to setup debugger to Generate Sequence Dia
« Reply #6 on: May 09, 2008, 01:14:30 am »
I more or less found the solution to the debug problem. Instead of relying on the application root I had to put in the full path for the source and binary files. Doing this I managed to generate a sequence diagram from the class with the main method.  I thought, great, fantastic and went home in celebration mood yesterday.  

However, when I came back to work today and trying to generate a sequence diagram from a class that is called from the main() method, it wouldn't work. Throwing again errors that it can't find the class".  

So depending on where I put the breakpoints just now it works or doesn't work. Very strange indeed.  It's the same application. Both classes are in the same folder and used by that application.  Only difference, the one class has the main() function the other is called within the main() function.  So why can I set breakpoints in the main() function, and it generates the Sequence Diagrams, but not in the class, that is being called by the main() method? What am I missing?