Author Topic: Turning On Debugging  (Read 9048 times)

0 Members and 1 Guest are viewing this topic.

Offline Mike Bobbitt

  • album.pl Author
  • Administrator
  • I Spend Too Much Time Here
  • *****
  • Posts: 3381
  • Karma: +35/-2
    • Mike's Development Archive
Turning On Debugging
« on: April 20, 2002, 16:48:31 »
There are three ways to turn on debugging:

From the web

Append the debug code to your URL. The debug code is set in album.cfg (debug_code) and is simply "debug" by default. This method will turn on debug mode for your session only. (Other users will not see debug output.) Example:

Code: [Select]
http://perl.cdnarmy.ca/cgi-bin/album.pl?debug=4
    If your URL already has variables appended to it, you'll need to use & instead of ?. See the notes in the next bullet to determine which debug level to use (1-4).

In album.pl

You can edit album.pl directly. Search for the lines like these and update the $debug variable as needed:
Code: [Select]
# Set debug level:
# 0 = None
# 1 = Special - Nothing has this code, so you can add a ,1 to any debug statement to make it stand out on it's own
# 2 = Standard - No recursive info or detailed file info. Usually just startup info.
# 3 = Detailed - Some recursive and detailed info.
# 4 = Overwhelming - Everything that ever had a debug turned on.
$debug=0;

Remember to remove it when you're done, as this will turn debug mode on for all visitors.

In album.cfg

Add a line like "debug=4" to the end of your album.cfg, and set $debug to equal whichever level you want to see. Remember to remove it when you're done, as this will turn debug mode on for all visitors.
« Last Edit: July 04, 2005, 09:05:29 by Mike Bobbitt »