Page tree
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 JVM arguments file jvm.config. Below you can find the most common directories the jvm arguments file is located.
    • Coldfusion 8: {CF8_HOME}\runtime\bin\
    • Coldfusion 9: {CF9_HOME}\runtime\bin\
    • Coldfusion 10: {CF10_HOME}\cfusion\bin\
    • Coldfusion 11: {CF11_HOME}\cfusion\bin\
    • Coldfusion 2016: {CF2016_HOME}\cfusion\bin\
  3. Make a copy of this file, and store the copy somewhere on your disk. If any issues are going to arise, you can restore the copy to this location.
  4. Open this file with any text editor.
  5. Locate the line beginning 'java.args'. These are the settings used to start the JVM, in which ColdFusion runs.
  6. Remove the following options if they exist:
    • -XX:+UseParallelGC
    • -Xdebug
    • -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
  7. Add these options (Ensure they are on the same line - at the end):
    • -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
  8. If you have any other applications listening/running on port 8000, then please change the port to another one which is free.
  9. Start all ColdFusion services.

Below is an example of the java.args arguments.

# 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 process for Railo is the same as 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 you have any other applications running on port 8000, change the port number to a free port.
  6. Start all Railo services

The JVM argument should look similar to the following.

"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

Windows

    • Stop all running Railo or Lucee services.
    • Locate the 'Railow' or the 'Luceew' application. Generally located in the following directory.
      • {RAILO_HOME}\tomcat\bin\
      • {LUCEE_HOME}\tomcat\bin\
    • Insert the following JVM arguments into the 'Java' tab:
      • -Djava.compiler=NONE -Xnoagent -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
    • If you have any other applications running on port 8000, change the port number to a free port.
    • Start all Railo or Lucee services

Linux

    • Stop all running Railo and Lucee services.
    • Locate the setenv.sh file. Generally located in the following directory.
      • {RAILO_HOME}\tomcat\bin\
      • {LUCEE_HOME}\tomcat\bin\
    • Insert the following JVM argument into this file and at the end of the CATALINA_OPT argument:
      • -Djava.compiler=NONE -Xnoagent -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
    • If you have any other applications running on port 8000, change the port number to a free port.
    • Start all Railo or Lucee services.
  • No labels