Exercise 4: Configuring debugging options

ColdFusion provides debugging information to make it easier to fix problems in your application. You can view debugging information for individual ColdFusion pages while editing them in Dreamweaver, or enable debugging throughout your application by using the ColdFusion MX 7 Administrator to set debugging options.

Viewing debugging information within Dreamweaver

Instead of enabling debugging for an application, you can view debugging information for any ColdFusion page in Dreamweaver.

To view debugging information for a ColdFusion page in Dreamweaver:

  1. Open the page to debug in Dreamweaver.
  2. On the Documents tab, click the Server Debug icon.
  3. If an Exceptions category appears in the Results panel, click the + button to expand the category.
  4. Fix the error and save the file, and click Browse.
  5. To leave debug mode, switch to either Code view or Design view.

Enabling debugging in the ColdFusion MX Administrator

The ColdFusion MX Administrator provides a variety of debugging settings that let you enable debugging information on a server-wide basis. If you are working on a development system, you can have these options turned on all the time. However, if you are working on a production system, you most likely will not want to have these options turned on, because the debugging information can appear on the bottom of an application page or in a dockable tree in your browser.

The location of the debugging information or the type of debugging data shown varies, depending on the options that you enable on the Debugging page in the ColdFusion MX Administrator. In the following example, the debugging output includes general information about the ColdFusion server, the execution time of the application, and variable information:

The following figure shows an example of how debugging information can appear when appended to the bottom of a page in a browser:


This image shows a picture of debugging information appended to the bottom of a form page.

If you are using a development server to build the sample application in this tutorial, you can enable some of these settings to help debug any unexpected problems.

Use the following steps to enable debugging options in the ColdFusion MX Administrator.

To enable debugging options:

  1. In the ColdFusion MX Administrator, select Debugging & Logging > Debugging Settings.

    A list of debugging options appears on the Debugging Settings page.

  2. Select the Enable Debugging check box.

    The debugging service is enabled for all options already selected on the page.

  3. On the Debugging Settings page, view the description of each option that is enabled. If you do not want to append debugging information for a specific option, clear the check box.

    For the purpose of this tutorial, enable the following debugging options:

    Option

    Description

    Database Activity

    Identifies database activity related to SQL query events.

    Exception Information

    Identifies ColdFusion exceptions raised in the debugging output.

    Tracing Information

    Lets you trace event information reported in the debugging output.

    Form, URL and Session Variables

    Displays variable information in the debugging output.

  4. Click Submit Changes when you are done.