CF8 Debugger presentation

CF8 Debugger presentation
Today I gave a short presentation on the ColdFusion 8 debugger as part of a series of short presentations at the ColdFusion User Group of Central New York meeting in Syracuse, NY.  You can download the presentation, the examples, and read a couple of tricks on setting up and using the CF8 debugger.

 

What can it do?

  • Set breakpoints
  • View and modify variable values
  • Step through your code line by line
  • Watch expressions
  • Go where no debugging has gone before and making debugging RIA much easier!

What do I need

  • Eclipse 3.1+ with CF8 extensions;
  • A ColdFusion 8 installation; and
  • A little time to set it all up.

How do I set this thing up?

  1. Before you do anything, read the Livedocs
  2. Enable RDS and Remote Debugging using CF Administrator
  3. Multi-instance installation: Modify the jvm.config as instructed
  4. Add the RDS Configuration in Eclipse
    1. Window > Preferences > ColdFusion > RDS Configuration
    2. Configure a new RDS Server
    3. Enter the description, hostname, and port.  The port for me is 8300 because I am using the  multiple server instances configuration; if you are using the standalone configuration and the built-in web server on your machine it is probably 8500.  Finally, enter your RDS credentials and test the connection.
    4. Also, you can test connecting to the debug server right here.  If you cannot connect to the debugger, make sure the debug server is running (since it is a separate process from ColdFusion) using the CF Administrator.
  5. Add the debug profile in Eclipse
    1. Run >  Debug…
    2. Select ‘ColdFusion Application’
    3. Click on the add button (as shown to the right)
    4. Enter the name, the debug home page URL, and select the RDS server you just set up.
    5. If the machine you are running Eclpse on, and the machine running ColdFusion 8 are not the same then enter mappings as necessary.
  6. Go grab some more coffee…

A couple of tricks

  • View generated output (Window > Show View > Other; then ColdFusion > Debug output buffer view)
  • Step-over is your friend.  Only use step-in as needed - you can step into something you don’t want to; i.e. the <cfdump> tag is actually a CFM file that is located in WEB-INF\cftags\dump.cfm.
  • Choose which variables to view (Preferences > ColdFusion > Debug Settings > Debugger scopes)
  • Request timeout is effected by debugging.  You might want to increase your request timeout in CF Administrator - if the CF server is only for development, of course.

Leave a Reply

Entries (RSS)