View Issue Details

IDProjectCategoryView StatusLast Update
0001020XdebugUncategorizedpublic2017-01-03 18:42
Reportermuyilangjun Assigned Toderick  
PriorityhighSeverityminorReproducibilityalways
Status resolvedResolutionunable to reproduce 
PlatformmacOSos xOS Version10.9.1
Product Version2.2.3 
Summary0001020: can not break when use spl_autoload_register,breakpoints has no effect
Description

after i upgrade to 2.2.3,i found that if a write php use spl_autoload_register,the files that include by spl_autoload_register ,and their breakpoints have no effect

I'm sorry to tell you 2.2.1 is ok

codes:

Steps To Reproduce

define("BASE_PATH", realpath(dirname(FILE) . "/../../"));
define("APPLICATION_PATH", BASE_PATH . '/application/');
define("LIBRARY_PATH", BASE_PATH . '/library');
define("PUBLIC_PATH", dirname(FILE));
require(LIBRARY_PATH . '/errorhandler.php');

define('GAME_ID', 1001);
define('SERVER_ID', 1);
define('MEMCACHE_PREFIX', GAMEID . '' . SERVERID . '');
define('COOKIE_NAME', 'FB');

function my_autoload($pClassName) {

$arr_class = explode('_', $pClassName);
$tm_length = count($arr_class);
if ($tm_length == 1) {
    $tm_file = LIBRARY_PATH . '/' . lcfirst($pClassName) . '.php';
    if (file_exists($tm_file)) {
        include_once $tm_file;
    } else {
        throw new Exception('fuck');
    }

}

$tm_length = $tm_length - 1;
$type = $arr_class[$tm_length];
if ($type == 'Model') {
    $tm_path = APPLICATION_PATH . 'models/';
    for ($i = 0; $i < $tm_length; $i++) {
        $tm_path = $tm_path . lcfirst($arr_class[$i]) . '/';
    }
    $tm_path = substr($tm_path, 0, -1);
    $tm_path = $tm_path . '.php';
    include_once $tm_path;
} else {
    $tm_path = LIBRARY_PATH . '/';
    for ($i = 0; $i <= $tm_length; $i++) {
        $tm_path = $tm_path . lcfirst($arr_class[$i]) . '/';
    }
    $tm_path = substr($tm_path, 0, -1);
    $tm_path = $tm_path . '.php';
    include_once $tm_path;
}

}

spl_autoload_register("my_autoload");

Match_Model::begin(86, 53, $tm_data);

Additional Information

Match_Model is a file include by my_autoload,I make breakpoints ,but they can not breaks

TagsNo tags attached.
Operating System
PHP Version5.4.9

Activities

derick

2016-12-03 12:48

administrator   ~0003876

Hi,

thanks for the report. In order to find and fix the bug, I really do need a reproducible case. As this seems to be a remote debugging issues, please refer to https://xdebug.org/support.php#remote as to what I would require.

cheers,
Derick

derick

2017-01-03 18:42

administrator   ~0004114

I could not reproduce this, as there was no reproducible case, and no additional information was presented. I am therefore closing this report.

Issue History

Date Modified Username Field Change
2013-12-31 07:58 muyilangjun New Issue
2016-07-31 12:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 12:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)
2016-12-03 12:48 derick Note Added: 0003876
2016-12-03 12:48 derick Assigned To => derick
2016-12-03 12:48 derick Status new => feedback
2017-01-03 18:42 derick Note Added: 0004114
2017-01-03 18:42 derick Status feedback => resolved
2017-01-03 18:42 derick Resolution open => unable to reproduce
2020-03-12 16:35 derick Category Usage problems (Wrong Results) => Variable Display
2020-03-12 16:38 derick Category Variable Display => Uncategorized