如何调试magento应用程序 [英] How to debug magento application

查看:158
本文介绍了如何调试magento应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在和Magento合作,但是我没有找到一个非常好的方式来调试我的模块。例如,很多时候,我有一个空白页,没有php错误,没有apache错误。例如,在后端,如果一个网格控制器设置不正确,我没有错误。



如何调试Magento模块?

解决方案

这听起来像是要启用开发人员模式。将它添加到.htaccess文件中:

  SetEnv MAGE_IS_DEVELOPER_MODEtrue
pre>

您可能还想在index.php中启用显示错误:

  ini_set('display_errors',1); 

我发现调试的最好方法是在本地环境中使用X-Debug。如果您无法在环境中运行X-Debug,也可以使用日志文件来帮助在生产环境中进行调试。



我在这里有一个更详细的帖子:



http://www.molotovbliss.com/debugging-tips-and-tricks-with-magent-commerce



还要安装 XDebug


I am working with Magento but i didn't find a very good way to debug my modules. For example, many time, i got a blank page with no php error and no apache error. For example, in backend, if one grid controller isn't well set, i don't have an error.

How to debug Magento module?

解决方案

It sounds like you want to enable Developer mode. Add this to your .htaccess file:

SetEnv MAGE_IS_DEVELOPER_MODE "true"

You may also want to enable display errors in index.php:

 ini_set('display_errors', 1);

The best way I have found to debug is with X-Debug in a local environment. You can also use log files to help debug in a production environment, if your unable to run X-Debug in the environment.

I've got a more detailed posting here:

http://www.molotovbliss.com/debugging-tips-and-tricks-with-magento-commerce

Consider also installing XDebug

这篇关于如何调试magento应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆