In Agentry 6.x (prior to SMP 3.0) one would add the following line to the [Java-1] section of the Agentry.ini file of the Agentry Server:

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

In this case the debugging port would be 7090, but this could be freely selected (as long as a free port was specified).

On SMP 3.0 the Agentry Server is using the JVM of the SMP itself, and adding above line to Agentry.ini has no effect.

Now the debugging port must be specified for the entire SMP server. This can be done in one of 3 ways (at least).

     1. As described by Jason Latko in this blog Debug SMP 3.0 Agentry Java in Eclipse – SAP Mobility – SCN Wiki

     This method is very easy to use and requires no permanent changes to your SMP installation. Only disadvantage is that you cannot use this when your server

     is running as a service.

     2. As described by Robert Turner as a comment to this wiki thread

               http://wiki.scn.sap.com/wiki/display/SAPMOB/Debug+SMP+3.0+Agentry+Java+in+Eclipse .

     This method is not verified (by me) and I strongly dislike it, as you need to do changes to the Registry of your host.

     3. In the <SMP_HOME>\props.ini file add the following 2 lines in the #jvm section:


     -Xdebug

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

     Now the SMP will be listening on the debug port specified (7090 in this case). This will work both when executing in the foreground (Go.bat) as well as when

     running as a service. This is however a permanent change and is not suited for a production environment. But for a development environment it is very

     transparent and easy to modify.

Please note that when enabling debugging, you can no longer control which Agentry Server you are debugging, if more than one Agentry instance is deployed to your SMP 3.0 (supported from SP04).

You will potentially be debugging all Agentry Server instances on your SMP server.

Søren Hansen.

To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

  1. Stephen Streeter

    Or a different option would be just “-debug” at the end of the shortcut when you start it.  The go.bat file already is looking at the options provided and if -debug is used, it will open port 8000

    (0) 
    1. Søren Hansen Post author

      This is actually the method described in point 1, which Jason Latko has documented in the mentioned blog. NB: You can also specify a custom debug port if required.

      Only problem is it does not work when your server is running as a service.

      Søren Hansen

      (0) 

Leave a Reply