I'm using play 2.1.2 and Java 1.7 on Eclipse.
This is a two part question. 1) How do we remote debug a process that's running on the play framework 2) How do I restrict the debug port to one of many play processes running on the server?
I'm trying to debug our website that's running off the play framework. We want to do a remote debug on it. I was told to add some JAVA_OPTS so we could do that but we are running two play processes for this website, one for the UI, and one for the query API. If I define JAVA_OPTS to debug on a specific port, I think all play processes will be using that port for debugging. How do I make play allow us to debug the UI process so that the debug port is only used by the UI process?
What we're doing in our script is executing
export JAVA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8765"
cd to_UI_dir
play start -Dhttps.port=9004 -Dhttps.keystorePassword=blah etc.
cd to_API_dir
play start -Dhttps.port=9007 -Dhttps.keystorePassowrd=blah2 etc.
Second problem is this:
When we run ps -ef | grep debug
on this, the java command run by play doesn't match what we defined int he JAVA_OPTS.
user 3500 3490 99 13:26 ? 00:37:43 java -Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=384M -Xdebug -Dfile.encoding=UTF-8 -Dplay.version=2.1.2 -Dsbt.ivy.home=/glide/bigdata/play-2.1.2/framework/../repository -Dplay.home=/glide/bigdata/play-2.1.2/framework -Dsbt.boot.properties=/glide/bigdata/play-2.1.2/framework/sbt/sbt.boot.properties -jar /glide/bigdata/play-2.1.2/framework/sbt/sbt-launch.jar start --Dhttps.port=9004 -Dhttps.keyStore=conf/stats.jks -Dhttps.keyStorePassword=password -Dconfig.resource=ssl.conf
Here, we just see the -Xdebug option but not the other things we defined. How do we make play use all the JAVA_OPTS we defined so we can debug the process?