Using JPDA Remote Debugging with SBS & Linux Setup

    This was not as easy as I'd like, but this could be a feature add for management.

     

    As the jive user, visit the following file:

     

    ~/applications/sbs/bin/manage

     

    Around line 115, make the following update:

    echolog "Starting application $JIVE_NAME" $LOG_FILE

     

    COMMAND="$JAVA_BIN $JAVA_OPTS $JPDA_OPTS $CONF_OPTS -D catalina....

     

    ~/applications/sbs/bin/instance

    Append the following line:

    export JPDA_OPTS="-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9113"

     

    After this, do a simple

    ~/bin/apprestart

     

    At this point, simply point your remote debugger (Eclipse or what not) at port 9113 on your server, and you should be able to attach to the JVM like a champ.

    Note:  If you pick a separate port number, just make sure that it doesn't conflict with an OOTB port number (i.e. 9000 not a good idea).

     

    Jivers?

    Is there a better way to do this and/or can you work this into the script as an option for us developers. =)

     

    Hope this helps someone.