There are times when you need to have a closer look how chtml is processing your file to find a problem. The chtml debugger can be used in these cases.
PHP Warning: If you use chtml in your PHP scripts, debug mode may cause strange output because of the way chtml commands remain in the source.
To enable debug mode in a file, place near the top:
<!--chtml options debug-->
If you wish to disable debug mode, you can put into the file:
<!--chtml options nodebug-->
The last of these commands in a file is the one which takes precedence.
To enable debugging for all files in a directory and its subdirectories, place into that directory's
You can disable debugging with:
The commands used to enable or disable debugging which are placed in a file take precedence over the ones in the
chtmlDebug command only works on the Apache 2.x servers (the new Linux www.washington.edu servers). Until the transition is complete, you can use this command to enable debugging which will work on both servers:
SetEnv CHTML_DEBUG on
When using the chtml debugger, all chtml commands will remain in the source, marked with a status. For example:
Included files will also show the full path to the file as well as where the file begins and ends. This helps to pick out nested include files:
While it may seem difficult at first to read this output, it's best to work from the inside out. Each
END pair shows the filename which is being included, and the output shows that code>test2.inc is included from within
The debugger also shows information about files which could not be included. For example:
If the error is
Permission denied, then either the file is unreadable or one of its parent directories is unreadable. This normally should only happen in the wwwdev or wwwudev environments.