Better Debugging with CF - PowerPoint PPT Presentation

About This Presentation
Title:

Better Debugging with CF

Description:

Displays execution time (and detailed!) Can be ... Can affect page/table layout, depending on HTML design. Custom Debugging ... Can display based on IP Domains ... – PowerPoint PPT presentation

Number of Views:46
Avg rating:3.0/5.0
Slides: 9
Provided by: dougl130
Category:

less

Transcript and Presenter's Notes

Title: Better Debugging with CF


1
Better Debugging with CF
  • By Douglas Smith
  • Teratech
  • July 11, 2000

2
Ways to Debug in CF
  • Standard CF Debug features have some benefits and
    limitations. This is the text you see at the
    bottom of the page when you turn on debug in the
    CF Administrator
  • Custom, hand-coded Debugging
  • Output text and variables in the code
  • Can be a hassle to comment in/out as needed
  • Use variables to turn debug text on/off as needed
  • Use OnRequestEnd.cfm and dyanamic display

3
ColdFusion Debuging
  • Controlled by IP Address
  • Advantages/features
  • Displays CF Query results
  • Displays execution time (and detailed!)
  • Can be turned off for specific pages
  • Limitations
  • No application variables
  • No Client or Session Variables
  • No Cookie variables
  • Can affect page/table layout, depending on HTML
    design

4
(No Transcript)
5
Custom Debugging
  • Output variables and conditions inside code.
    Generally must always be commented out before
    publication.
  • My Advice - Dont do this. Set a debug variable,
    and turn on and off code with the variable. This
    way, you will control the debug text better
    inside of complicated code in a more professional
    and systematic way. Also very good for modules.
  • For exampleltCFSET DebugTruegtltCFIF Debuggt
  • ltcfoutputgtMyVar is MyVarltbrgtlt/cfoutputgt
  • lt/cfifgt

6
An Enhanced Debugging Tool
  • See the handout
  • Use OnRequestEnd.cfm
  • Displays application, session and client
    variables dynamically. As soon as they are
    created, they show up.
  • Debug display can be user specific, instead of IP
    specific.
  • Can display based on IP Domains
  • Can display CGI and other custom variables, and
    even page variables, as needed

7
Warnings
  • Always checkout your HTML layout with debugging
    turned off, since it can affect page and table
    width, depending on HTML design.
  • Debug text can cause problems with CFCONTENT
    pages. Should turn off for these pages, or have
    two modes HTML display and then a
    content/download display.

8
Download Source
  • http//www.cfug-md.org/
  • Send questions (and your comments/ideas for
    improvements) to douglas_at_teratech.com
Write a Comment
User Comments (0)
About PowerShow.com