Aspen:Debugging

From Aspen Documentation

There are many ways Aspen will help you debug your applications (in addition to the regular print_r and var_dump we're all used too!).

Contents

Error Logs

By default, Aspen logs all errors to the error_log table in the database. Browse this table to catch any errors.

We've built a basic error reporting script you can use to more easily view these error logs. You may download this script here.

Upload this script to the root aspen install directory and view it in a web browser. It will combine repeat errors into a single box and display a count with color mapping for each error.

To have the error logs emailed to you, edit the send_error_emails configuration item.

System / Application Logs

First, read the article on using system logs. The default logging that Aspen does is extremely useful already, especially when you're trying to debug load or routing errors.

You may also add logging support within your application. By using the log->write() method you can output any data to the log file.

This is a great process if you want to avoid interrupting the flow or routing of an application that printing to the browser would cause.

Display Errors

Syntax or other fatal errors may prevent aspen from even loading properly, so we can't error log those issues. In the bootstrap class we disable the display of php error messages, which may already be disabled on many production servers.

To turn the function back on, open the bootstrap file and at the top you'll find:

ini_set('display_errors', false);

Temporarily change it to:

ini_set('display_errors', true);

Support

If things are still not working right then post your problem in our google group.