Latest Register Log In

+ Advanced Search

Debug Mode

Debug Mode
By
03/22/04 (Edited 03/11/14)

At Admin Panel -> Settings -> System Configuration, you have the option of setting a debug level. Debug mode allows you to see details of how pages are being constructed by MySQL and PHP. This can be useful in diagnosing slow-downs since it reports the load time after each query.

Note that you can also set a debug level in the url by tacking a debug=1 parameter onto the url (like index.php?debug=1).

A summary of the debug levels:
None - This is the normal operational state. Debug content is only shown when there's an error on the page.
Show queries as executed - This is the full force debug, which shows all queries as they happen.
Only show queries to admin, not to other users - This is ideal if you're working with a live site. It works much like show queries, except that your visitors don't realize there's any debugging going on as it only shows to people in the admin usergroup.
Only show totals and execution time - This is for when you just want to see how long the page is taking to generate. If you've added lots of toplists or turned on server-intensive features, this can help you determine if your pages have been slowed unacceptably and you need to do some optimizations.
Show totals and execution time to admin only - Same as previous, except invisible to normal users... useful if you don't wish anyone but yourself to see the page load time and query count.
Suppress all errors for non-admins (log to wsnerrors.html) - This is the anti-debug. It prevents all errors from being displayed to non-admins. The page will simply be rendered as far as is possible without php complaining about not being able to do some of the things it was told to do. The errors will be logged to the file wsnerrors.html (note: prior to version 6.0.15 they were emailed to you).
Strict mode - For development. You don't want to use this.
Strict mode (w/notices) - For development. You don't want to use this.

When at debug level "show queries", you will not be able to login. You will stay logged in when you start off that way, but if you log out you won't be able to login again. Be aware of this, so that you are prepared for the possibility of having to go into phpmyadmin to change the debug level back to 0 (see the wsnlinks_settings table where the name is 'debug', and set the content to '0').




Description Explanation of each debug level, and tips on debuggging.
Rating
Views 1507 views. Averaging 0 views per day.