Skip to content

Debugging Tools

Magento 1 Logs

Logs are stored in {Magento Root}/var/log

  • var/log/system.log is for notices and minor errors
  • var/log/exception.log is for full stacktraces
  • var/report contains a stacktrace whenever an error page is displayed

AOE Profiler

This extensions helps to profile magento projects. To download it go to https://github.com/AOEpeople/Aoe_Profiler

To enable profiling add this to local.xml

<config>
    <global>
        <resources>
            <default_setup>
                <connection>
                    <profiler>1</profiler>
                </connection>
            </default_setup>
        </resources>
    </global>
</config>

In the magento var file you will put a config file for the AOE Profiler. This will be named aoe_profiler.xml, the module comes with a aoe_profiler.xml.sample which contains a sample configuration and explanations. Link to aoe_profiler.xml.sample

One notable option is <trigger>. They are 3 options for trigger:

  • always
    • This will trigger every time a page is loaded, including admin. This can very quickly become unmanageable.
  • parameter
    • This will trigger every time the argument ?profile=1 is in the url, or there is a cookie profile.
  • never
    • This will never trigger.

The cache will need to be cleared when you make changes to this file.

Also you can find some settings in Magento admin under System -> Configuration -> Developer -> Debug.

To find the results of the profile you can find a table at System -> AOE Profile.

Maxiumum Execution Time for Profiling

Adding execution time to the php fpm configuration will allow the profiler for Magento to run for a longer period of time

  • Change the max_execution_time in the /etc/php.ini
  • Turn of xdebug for more accurate results

Redacted

Trouble Shooting

Results not showing