Debugging with Railo

Like other CFML engines, Railo allows to choose between different debugging templates. The templates are located in the folder /railo-context/admin/templates/debugging.

We added a debugging template called debugging-neo.cfm which displays as the well known debugging output of MX. Next to this one we added two interesting debugging templates.

  1. debugging-comment.cfm
  2. debugging-cascade.cfm

The debugging comment template is one that fills it's content as HTML commentary so that you experience no layout changes when activating this template. When you take a look at the source of the page you will find notes like this whithin it:

<!--
Debugging:

========================================================================================================================================= | SOURCE | COUNT | LOAD | QUERY | APP | TOTAL | ----------------------------------------------------------------------------------------------------------------------------------------- | ra://D:\Projects\davidoff\WEB-INF\railo\context\railo-context.ra!/admin/development.debugging.cfm | 1 | 0 | 0 | 47 | 47 | | D:\Projects\davidoff\WEB-INF\railo\context\templates\debugging\debugging-comment.cfm | 1 | 0 | 0 | 0 | 0 | ... more lines ... | ra://D:\Projects\davidoff\WEB-INF\railo\context\railo-context.ra!/admin/resources/text.cfm | 1 | 0 | 0 | 0 | 0 | | ra://D:\Projects\davidoff\WEB-INF\railo\context\railo-context.ra!/admin/web_functions.cfm | 1 | 0 | 0 | 0 | 0 | | TOTAL | 0 | 1 | 0 | 47 | 47 | ========================================================================================================================================= -->

The prefix ra:// indicates that a certain file is taken from a railo archive. Then you have 5 columns telling you how often a template has been called, how long it took to compile and load, how long queries took inside the template, how long the template took to process and the total time the template consumed.

The other one called debugging-cascade.cfm is one that makes usage of cookies in order to expand information.

The list of executed templates is colored from red to green depending on the execution time. Red - slower, green - fast. The percentage of time is display next to the template, so that you can see wich of your templates consumes the largest amount of time. I guess the numbers are self-explanatory.

You can set several options like sorting of executiontimes, sql queries etc. In order to save time you can prevent sql or template output from being displayed. In addition to that dumps of several scopes can be displayed as well.

A small goodie is the replaySQL button (green play icon) which allows you to replay the sql statement and display the results in a new window, since this is something users might often do.
The result looks like this:

At the bottom of the page you have an anchor which brings you to the top of the debugging, since sometimes you have to scroll a lot in order to find it.

Follow this link to download the set of debugging templates we have at the moment. If you have any comments, just drop a message.
The debugging-2-console template is quite usefull for background debugging. If you made any improvements to some of the templates, just send them to me and we will try to implement them in upcoming releases.

My personal favorite is debugging-2-console since it has some features I really often need. Cumulating query times, background debugging and much more. I would appreciate your comments.

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
Martyn's Gravatar How do restrict which IP addresses can see debug output (as Adobe CF Server can do) ? I want to see my debug output, but don't want my users to see it.

Thanks!
# Posted By Martyn | 01.07.09 00:34
Gianna's Gravatar With the release of Railo 3.1 - people can now use the interactive step debugger, FusionDebug 3.0, to debug Railo. A trial version is available here - http://www.fusion-reactor.com/fd/downloads.cfm
# Posted By Gianna | 07.09.09 12:50
BlogCFC was created by Raymond Camden. This blog is running version 5.9.1.002. Contact Blog Owner