如何在 Aptana 或 Eclipse 中使用 Yii 框架配置 Xdebug



我已经安装了Xdebug,并在Ubuntu OS上运行,使用Apatana作为IDE。当我开始调试时,它停止在索引.php第 2 行。

<?php
error_reporting(E_ALL);
// change the following paths if necessary
$yii=dirname(__FILE__).'/../yii/framework/yii.php';   ==> this is the line no 2
$config=dirname(__FILE__).'/protected/config/main.php';
// remove the following lines when in production mode
defined('YII_DEBUG') or define('YII_DEBUG',true);
// specify how many levels of call stack should be shown in each log message
defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
require_once($yii);
Yii::createWebApplication($config)->run();

我不明白是什么原因,任何 Yii+xdebug 专家请帮助我,我是否需要在 aptana 上进行任何额外的配置,例如添加库?

Xdebug 总是在代码的第一行停止。由 IDE 来禁用此功能。它通常是"第一行中断"设置。您应该能够从菜单"工具"|"中将其关闭选项,单击 PHP 图标并取消选中在第一行停止框。

XDebug break_on_exception参数定义了调试停止时的情况,它具有默认值,例如"致命错误"、"可捕获的致命错误"、"警告"、"解析错误"、"通知"、"严格标准"、"已弃用"、"Xdebug"、"未知错误"。

只需将它们更改为"致命错误","可捕获的致命错误","解析错误"。

最新更新