Adobe ColdFusion 8

Setting up ColdFusion to use the Debugger

Before you can use the Debugger, you must enable debugging in the ColdFusion Administrator.

Set up ColdFusion to use the Debugger

  1. In the ColdFusion Administrator, select Debugging & Logging > Debugger Settings.
  2. Enable the Allow Line Debugging option.
  3. Specify the port to use for debugging if different from the default that appears.
  4. Specify the maximum number of simultaneous debug session if different from the default.
  5. Click Submit Changes.
  6. You may have to increase the time after which requests time-out by doing the following:
    1. Select Server Settings > Settings.
    2. Enable the Timeout Requests After (Seconds) option.
    3. Enter 300 or other appropriate number in the text box.
  7. Restart ColdFusion. If you are running the J2EE configuration of ColdFusion, you must restart the server in debug mode with the debug port as specified.
  8. To modify the debug settings, in Eclipse, select Window > Preferences > ColdFusion > Debug Settings. You can specify the home page URL, which points to the page that appears in the Debug Output Buffer of the debugger when you click the Home button. You can also specify the extensions of the types of files that you can debug and variable scopes that you want the Debugger to recognize. To improve performance when debugging large files, deselect all scopes for which you do not require information.

Note: To ensure that the debugger stops in the template you are debugging on the line that causes a ColdFusion error, you must select Preferences > ColdFusion > Debug Settings and select the Enable Robust Exception Information checkbox.

  1. To configure an RDS server, in Eclipse, select Window > Preferences > ColdFusion > RDS Configuration.

    If you are running ColdFusion on the same computer as Eclipse, localhost is configured by default. To use any additional RDS servers, you must enter the configuration information.

  2. If ColdFusion and Eclipse are not running on the same computer, in Eclipse, select Window > Preferences > ColdFusion > Debug Mappings. Then specify the path that Eclipse uses to open files on the ColdFusion server and the path that ColdFusion uses to find the files that you are editing in Eclipse.

    Mapping ensures that Eclipse and ColdFusion are working on the same file. For example, you may be editing files in an Eclipse project that points to D:\MyCoolApp. Then, when you deploy the files to the ColdFusion server, you copy them to W:\websites\MyCoolSite\, which the ColdFusion server recognizes as D:\Shared\websites\MyCoolSite. The mapping in Eclipse specifies that the Eclipse directory is D:\MyCoolApp and the server is D:\Shared\websites\MyCoolSite. Eclipse translates the file path (D:\MyCoolApp\index.cfm) to a path that the ColdFusion server recognizes (D:\Shared\websites\MyCoolSite\index.cfm). To see more information about the interaction between the client and the server, add the following to the JVM arguments in the ColdFusion Administrator:

    -DDEBUGGER_TRACE=true

  3. If you are not running the server configuration of ColdFusion, you must specify Java debugging parameters in the configuration file or startup script of the application server you are running. The parameters should look like the following:
    -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=<port_number>

    Ensure that the port number you specify is the same port number specified on the Debugger Settings page of ColdFusion Administrator.

    If you are running the server configuration, ColdFusion writes these debugging parameters to the jvm.config file when you use the Debugger Settings page of the ColdFusion Administrator.

  4. If you are not running the server configuration and your application server is not running on JRE 1.6, you must copy the tools.jar file of the JDK version that your application server is running to the \lib folder of ColdFusion. For example, if you are running JRun that runs on JRE 1.4, copy the tools.jar file of JDK 1.4 to the \lib folder of ColdFusion.
  5. If you are running the server version of ColdFusion and you specify a JRE version other than JRE 1.6 in the jvm.config file, you must copy the tools.jar file of the JDK version specified in your jvm.config file to the \lib folder of ColdFusion.

Note: To debug ColdFusion applications running on the multiserver configuration, you must start the ColdFusion server from the command line using the following command:

jrun -config <path_to_jvm_config> -start <server_name>