Please see the following page for how to enable Debug Logs in Salesforce:

https://help.salesforce.com/HTViewHelpDoc?id=code_monitoring_debug_logs.htm&language=en_US

Also, periodically debug logs will reach their maximum size without logging the data that you need. You may wish to enable filters to capture only the informaiton you need from the debug logs.  The follow page descibes the various filters available:

https://help.salesforce.com/HTViewHelpDoc?id=code_setting_debug_log_levels.htm&language=en_US