cancel
Showing results for 
Search instead for 
Did you mean: 

How to debug JAVA Source Code in SMP 3.0

Former Member
0 Kudos

Hello All , We are running SMP 3.0 Server as service (goservice.bat) and we want to debug JAVA source code . How to debug when we are running as service ? Can you please provide some suggestion ? Thanks & Regards,   Kunal Varaiya

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Kunal Varaiya,

here is the answer:

Quelle: http://scn.sap.com/community/developer-center/mobility-platform/blog/2014/11/18/smp-30-agentry-debug...

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=nIn 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 threadhttp://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.


Best Regardes,

André