Child pages
  • Setting up Java for Debugging (ColdFusion, Railo & Lucee)
Skip to end of metadata
Go to start of metadata

Setting up ColdFusion for Debugging

This procedure adds the required debugging parameters to a standard ColdFusion (JRun) installation.

  1. Stop all running ColdFusion services
  2. Locate the Java configuration file (jvm.config)
    1. Coldfusion 8: {CF8_HOME}\bin\
    2. Coldfusion 9: {CF9_HOME}\bin\
    3. Coldfusion 10: {CF10_HOME}\cfusion\bin\
  3. Make a copy of this file, and store the copy somewhere on your disk.  In case of problems, you can restore the copy to this location
  4. Open this file (Not the copy) in a text editor
  5. Locate the line beginning 'java.args'. These are the settings used to start the Java Virtual Machine, in which ColdFusion runs
  6. Remove this option if it exists:
    1. -XX:+UseParallelGC
  7. Add these options (Ensure they are on the same line - at the end!):
    1. -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
  8. If you have any other applications running on port 8000, change the port number to a free port
  9. Start all ColdFusion services

The following line is an example of a complete java.args parameter line:

# Arguments to VM
java.args=-server -Xms256m -Xmx512m -XX:MaxPermSize=192m -XX:+UseParallelGC -Xbatch -Dcoldfusion.home={application.home} -Djava.awt.headless=true -Dcoldfusion.rootDir={application.home} -Djava.security.policy={application.home}/lib/coldfusion.policy -Djava.security.auth.policy={application.home}/lib/neo_jaas.policy  -Dcoldfusion.classPath={application.home}/lib/updates,{application.home}/lib,{application.home}/lib/axis2,{application.home}/gateway/lib/,{application.home}/wwwroot/WEB-INF/cfform/jars,{application.home}/wwwroot/WEB-INF/flex/jars,{application.home}/lib/oosdk/lib,{application.home}/lib/oosdk/classes -Dcoldfusion.libPath={application.home}/lib -Dorg.apache.coyote.USE_CUSTOM_STATUS_MSG_IN_HEADER=true -Dcoldfusion.jsafe.defaultalgo=FIPS186Random -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000

Setting up Railo and Lucee for Debugging

There are two different types of Railo servers; an express installation with Jetty and a Railo Server with Tomcat.
Please note that the installation of Lucee is the same as Railo. Where the references to Railo are please note this and change accordingly for
Lucee.

Express Installation (Using the start.bat)

  1. Stop any running instances.
  2. Locate the start.bat file
  3. Make a copy of this file and store it in a temporary location in case of errors during editing
  4. Replace the start.bat file (Not the copy) with a replacement batch file, based on your operating system:
  5. If this doesn't work, revert back to your original start.bat file and update the JVM arguments yourself by inserting:
  6. If you have any other applications running on port 8000, change the port number to a free port
  7. Start all Railo services

A finished JVM argument should look something like:

"jre/bin/java" -Djetty.port=8888 -DSTOP.PORT=8887 -DSTOP.KEY=railo -Xms256M -Xmx512M -Xss1m -Dcom.sun.management.jmxremote -Djava.compiler=NONE -Xnoagent -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000 -jar start.jar

Railo / Lucee Server with Tomcat

As a Script (Using Catalina.bat)

  1. Stop all running Railo/ Lucee services
  2. Locate the Catalina.bat file for Windows, or Catalina.sh file for Linux
    1. {RAILO_HOME}\tomcat\bin\
  3. Insert the JVM argument into this file depending on your OS:
    1. Windows: set CATALINA_OPTS=-Djava.compiler=NONE -Xnoagent -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
    2. Linux: CATALINA_OPTS=-Djava.compiler=NONE -Xnoagent -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
  4. If you have any other applications running on port 8000, change the port number to a free port
  5. Start all Railo services

As a Windows Servive

  1. Stop all running Railo/ Lucee services
  2. Navigate to the JVM Arguments Tab
    1. See: http://www.aliaspooryorik.com/blog/index.cfm/e/posts.details/post/tomcat-jvm-settings-on-windows-364
  3. Place the following JVM argument into this Tab
    1. -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000

 

 

  • No labels