需要帮助调试PHP web应用程序使用netbeans-xdebug作为我的应用程序冻结达到我的类定义

时间:2014-02-25 07:51:14

标签: php netbeans

我正在使用netbeans-xdebug在netbeans IDE上调试我的PHP wed应用程序。我的应用程序在包含我的类定义文件的指令时冻结。我没有看到任何错误消息(不知道在哪里看。抱歉第一次完成整个过程)。我该如何调试? 我使用db2php生成了我的类,并包含了所有相关文件。我可以在调试之前逐步完成所有这些类,然后来到我的班级,此时整个事情都会冻结。调试窗口中没有错误消息

我的类定义(由db2php插件生成并由我修改以添加构造函数)如下所示

class AptInfo extends Db2PhpEntityBase implements Db2PhpEntityModificationTracking {
    private static $CLASS_NAME='AptInfo';
    const SQL_IDENTIFIER_QUOTE='`';
    const SQL_TABLE_NAME='apt_info';
    const SQL_INSERT='INSERT INTO `apt_info` (`apt_id`,`house_number`,`block`,`apt_area`,`apt_type`,`apt_usage`,`owner_id`,`tenant_id`) VALUES (?,?,?,?,?,?,?,?)';
    const SQL_INSERT_AUTOINCREMENT='INSERT INTO `apt_info` (`house_number`,`block`,`apt_area`,`apt_type`,`apt_usage`,`owner_id`,`tenant_id`) VALUES (?,?,?,?,?,?,?)';
    const SQL_UPDATE='UPDATE `apt_info` SET `apt_id`=?,`house_number`=?,`block`=?,`apt_area`=?,`apt_type`=?,`apt_usage`=?,`owner_id`=?,`tenant_id`=? WHERE `apt_id`=?';
    const SQL_SELECT_PK='SELECT * FROM `apt_info` WHERE `apt_id`=?';
    const SQL_DELETE_PK='DELETE FROM `apt_info` WHERE `apt_id`=?';
    const FIELD_APT_ID=536777627;
    const FIELD_HOUSE_NUMBER=702030574;
    const FIELD_BLOCK=987946407;
    const FIELD_APT_AREA=447002381;
    const FIELD_APT_TYPE=447575482;
    const FIELD_APT_USAGE=990668577;
    const FIELD_OWNER_ID=828356301;
    const FIELD_TENANT_ID=-1961505558;
    private static $PRIMARY_KEYS=array(self::FIELD_APT_ID);
    private static $AUTOINCREMENT_FIELDS=array(self::FIELD_APT_ID);
    private static $FIELD_NAMES=array(
        self::FIELD_APT_ID=>'apt_id',
        self::FIELD_HOUSE_NUMBER=>'house_number',
        self::FIELD_BLOCK=>'block',
        self::FIELD_APT_AREA=>'apt_area',
        self::FIELD_APT_TYPE=>'apt_type',
        self::FIELD_APT_USAGE=>'apt_usage',
        self::FIELD_OWNER_ID=>'owner_id',
        self::FIELD_TENANT_ID=>'tenant_id');
    private static $PROPERTY_NAMES=array(
        self::FIELD_APT_ID=>'aptId',
        self::FIELD_HOUSE_NUMBER=>'houseNumber',
        self::FIELD_BLOCK=>'block',
        self::FIELD_APT_AREA=>'aptArea',
        self::FIELD_APT_TYPE=>'aptType',
        self::FIELD_APT_USAGE=>'aptUsage',
        self::FIELD_OWNER_ID=>'ownerId',
        self::FIELD_TENANT_ID=>'tenantId');
    private static $PROPERTY_TYPES=array(
        self::FIELD_APT_ID=>Db2PhpEntity::PHP_TYPE_INT,
        self::FIELD_HOUSE_NUMBER=>Db2PhpEntity::PHP_TYPE_STRING,
        self::FIELD_BLOCK=>Db2PhpEntity::PHP_TYPE_STRING,
        self::FIELD_APT_AREA=>Db2PhpEntity::PHP_TYPE_INT,
        self::FIELD_APT_TYPE=>Db2PhpEntity::PHP_TYPE_STRING,
        self::FIELD_APT_USAGE=>Db2PhpEntity::PHP_TYPE_STRING,
        self::FIELD_OWNER_ID=>Db2PhpEntity::PHP_TYPE_INT,
        self::FIELD_TENANT_ID=>Db2PhpEntity::PHP_TYPE_INT);
    private static $FIELD_TYPES=array(
        self::FIELD_APT_ID=>array(Db2PhpEntity::JDBC_TYPE_INTEGER,10,0,false),
        self::FIELD_HOUSE_NUMBER=>array(Db2PhpEntity::JDBC_TYPE_VARCHAR,10,0,false),
        self::FIELD_BLOCK=>array(Db2PhpEntity::JDBC_TYPE_VARCHAR,3,0,false),
        self::FIELD_APT_AREA=>array(Db2PhpEntity::JDBC_TYPE_INTEGER,10,0,true),
        self::FIELD_APT_TYPE=>array(Db2PhpEntity::JDBC_TYPE_CHAR,6,0,true),
        self::FIELD_APT_USAGE=>array(Db2PhpEntity::JDBC_TYPE_CHAR,14,0,true),
        self::FIELD_OWNER_ID=>array(Db2PhpEntity::JDBC_TYPE_INTEGER,10,0,true),
        self::FIELD_TENANT_ID=>array(Db2PhpEntity::JDBC_TYPE_INTEGER,10,0,true));
    private static $DEFAULT_VALUES=array(
        self::FIELD_APT_ID=>null,
        self::FIELD_HOUSE_NUMBER=>'',
        self::FIELD_BLOCK=>'',
        self::FIELD_APT_AREA=>null,
        self::FIELD_APT_TYPE=>null,
        self::FIELD_APT_USAGE=>null,
        self::FIELD_OWNER_ID=>null,
        self::FIELD_TENANT_ID=>null);
    private $aptId;
    private $houseNumber;
    private $block;
    private $aptArea;
    private $aptType;
    private $aptUsage;
    private $ownerId;
    private $tenantId;

        public function __construct($block, $housenumber, $owner_id = NULL, $aptArea=NULL, $aptType=NULL, $aptUsage=NULL, $tenant_id = NULL) {
            $this->block = $block;
            $this->houseNumber = $housenumber;
            $this->ownerId = $owner_id;
            $this->aptArea = $aptArea;
            $this->aptType = $aptType;
            $this->aptUsage = $aptUsage;
            $this->tenantId = $tenant_id;
            $this->aptId = NULL;
        }
// there is lot more code here (set and get functions for each variable which i am skipping for the sake of this question
}

我是调试PHP的新手,所以不确定如何/在哪里查找错误因此请原谅这是一个相当愚蠢的问题

提前谢谢 雀塔

1 个答案:

答案 0 :(得分:0)

好的,我找到了如何查看错误消息的答案。它们显示在浏览器窗口中。但是我们需要在php.ini中将变量display_errors = On设置为默认关闭一旦我看到错误消息它清楚我在类定义中出错了在上面的情况我已经在包含文件名中输入了一个类型因此无法找到Db2PhpEntityModificationTracking类的定义