Book a Demo

Author Topic: Cannot Debug Java within EA  (Read 3259 times)

dfricker

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Cannot Debug Java within EA
« on: June 22, 2012, 06:45:08 pm »
I have created a new project based on the HelloWorld Java template. The HelloWorld class compiles successfully when built in EA, and I have updated the Patterns.Java.Applet analyzer script to specify the application class and arguments to use when debugging. However, when I go to debug the program the program is not run, all i can see is ssprofiler75.exe being run momentarily and the java program is never executed (have used breakpoints and infinite loops to verify). If I click Show diagnostic messages in the script options, I can see that it is outputting the domain groups that I am a member of but that is all that is shown?

wte-syntegris

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Cannot Debug Java within EA
« Reply #1 on: August 17, 2012, 01:20:00 am »
I reported the same problem with the tutorial example to the support some weeks ago, no luck so far. Today I played with attaching the debugger to a running process and got an explicit error message regarding the SSPROFILER75. Maybe the installation is faulty, the PATH-variable (containing directory ...\EA) is incomplete? See

command:
java -agentlib:"SSProfiler75" samples.Collector

result:
Error occurred during initialization of VM
Could not find agent library SSProfiler75 on the library path, with error: Can't find dependent libraries

wte-syntegris

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Cannot Debug Java within EA
« Reply #2 on: August 17, 2012, 01:39:33 am »
well, I probably should add that using SSJavaProfiler75 (see EA documentation) instead of SSProfiler75 enables the EA-debugger to attach itself to the running process.
NB: this worked with the 32-bit JVM, 64-bit does not seem to be supported.
This is less comfortable than debugging directly into the source code but at least a work around. The final command is:
java -agentlib:SSJavaProfiler75 samples.Collector

to test this with the turorial example you should make the execution wait for the debugger - I added a System.in.read()
« Last Edit: August 17, 2012, 07:21:05 pm by wte-syntegris »

dfricker

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Cannot Debug Java within EA
« Reply #3 on: August 21, 2012, 05:19:28 pm »
Hi, thanks for the reply that sounds like a useful suggestion. Due to a few issues and missing features with simulation and execution within EA we have since decided to continue using Rhapsody for model driven development! Therefore I can't try this out myself but I hope it is useful for anyone else experiencing this problem. I wondered if it was anything to do with the fact that we have a proxy for external connections and the profiler was trying to access something?
Thanks