Hello,

I would like to describe step by step how to set up remote debugging in Composer for code that runs on remote server like the Documentum Java Method Server.

  1. Enable the remote debugging on the Java Method Server
    To enable the remote debugging on JMS on the port 8000, edit the file startMethodServer.cmd or startMethodServer.sh in the folder [DCTM_INSTALL_FOLDER]\jbossx.y.z\server (ex: D:\Documentum\jboss7.1.1\server or $DOCUMENTUM/share/jboss7.1.1/server/) and add the following instruction at the beginning of the script:
    WINDOWS
    set JAVA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n %JAVA_OPTS%
    LINUX:
    JAVA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n $JAVA_OPTS"

    Exemple:
    set JAVA_HOME=D:\Documentum\java64\1.7.0_72
    set NOPAUSE=true
    set USER_MEM_ARGS=-Xms1024m -Xmx1024m -XX:PermSize=64m -XX:MaxPermSize=256m -Xss256k -XX:+DisableExplicitGC -Xrs
    set JBOSS_BASE_DIR=D:\Documentum\jboss7.1.1\server\DctmServer_MethodServer
    set JAVA_OPTS=%USER_MEM_ARGS% -Djboss.server.base.dir=%JBOSS_BASE_DIR% -Duser.name=dmadmin -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
    D:\Documentum\jboss7.1.1\bin\standalone

     

  2. Restart the Java Method Server (a simple service in Windows).
     
  3. In Composer, configure a Debug configuration on the targeted Documentum Project:

    …select the Remote Java Application:

    …fill in the host of JMS and the debug port:

    …opening of Debug View in Composer:

     

  4. Add a breakpoint in the Java Code:

     
  5. Execute JMS (method/job via DQL or in DA) and use usually of the Debug Perspective in Composer like Eclipse:

     
  6. Warning : the debug port is reachable simultaneously ONLY by ONE client machine because the client machine is linked in connected mode to the DCTM server. So, the client machine must always disconnect from debug port after use:

     

Note: If a client machine is already connected to debug port, the others machine/developer obtain the following error in Composer:

…on local machine, check if the DCTM remote debug port is accessible from local machine via Telnet:

C:\Users\hozveren>Telnet mydctmserver 8000
Connecting To mydctmserver ...Coud not open conection to the host, on port 8000: Connect failed

…on remote server, check if there are actives connexions on the debug port (8000):

C:\>netstat –an
… display the connexions 

C:\>netstat 1an
… display the connexions with continuous refresh

 

That’s all!!!

Huseyin OZVEREN