Debug and set break points in Java Extensions classes

I am using Eclipse 3.1 IDE. I am in the process of writing some extensions, and the Rhythmyx server is setup locally on my machine.

Can I run the Rhythmyx server in Debug mode or can I setup breakpoints in JEXL Extensions classes? I wanted to step thru the Java classes/ methods as they are invoked.

thanks
Manvinder

Yes, it’s possible to do this.

You have to use “Remote Debugging” in Eclipse.

The Rhythmyx Server must be started with the following JVM options:


-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8100,suspend=n

This will cause the JVM to listen for debugging on port 8100. You will need, in your Eclipse project, to specify this port (and the server’s host name) in order to connect.

Setting the JVM options differs by version. In 6.5.x, you use a “RhythmyxServer.ja” file. In 6.6 and higher there is a “RhythmyxServer.lax” file.

Some of the server’s internal classes are obfuscated, so you cannot debug them directly. All of your classes (and the PSOToolkit, for example) are not obfuscated, and you can set breakpoints and examine variables in the usual fashion.

Dave

Hi Dave,
Thanks for your response. I started the server as follows:

RhythmyxServer.exe -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8100,suspend=n

I setup the eclipse debug options as well, but still I am not able to hit the breakpoints.

Also are we supposed to edit the “RhythmyxServer.lax” file in any way.

I know your instructions are very elaborate, but was wondering if you are aware of any document with instructions on how to setup debug env. with Eclipse.

manvinder

If this is 6.6 (or 6.7) then you MUST edit the lax file, you cannot add the options on the command line. You have to restart the server after you change the lax file.

The setup of debugging in Eclipse requires you to use the “Run - Open Debug Dialog” menu and select “Remote Java Application”. Follow the checklist that appears in the right half of the dialog. (Create a new application…)

There is nothing here that is specific to Rhythmyx, so any of the numerous online tutorials will show you what to do. For example:

http://www.eclipsezone.com/eclipse/forums/t53459.html

Dave

Is the -Xdebug attached onto the

LAX.NL.JAVA.OPTION.ADDITIONAL

-----------------------------

Java arguments

lax.nl.java.option.additional=-Dprogram.name=RhythmyxServer.exe (blahblahblah) -Xdebug etcetcetc?

Yes, this is correct. Then you must re-start the server.