View Issue Details

IDProjectCategoryView StatusLast Update
0000741XdebugUsage problems (Wrong Results)public2014-02-27 20:10
ReporternnmatveevAssigned Toderick 
PriorityhighSeveritymajorReproducibilityhave not tried
Status resolvedResolutionwon't fix 
Product Version 
Target VersionFixed in Version 
Summary0000741: Unable to rich more value children level than 'max_depth' when obtain value from 'eval' command
DescriptionThe issue appears if you use 'evaluate expression' feature in the IDE and need to open more children levels than configured in 'max_depth'. We use the minimum possible 'max_depth' value as it speed ups stepping (we reload stack frames data on every step using 'context_get' command). The only way - re-evaluate the whole expression.

We need to have some kind of global cache of all evaluated values and clean it after each step.
Steps To ReproduceConsider the following script:
<?php
function foo(){
    return array(array(array(array(array(array(array(array(1))))))));
}
echo 1; //breakpoint

Eval 'foo()' expression when you will reach a breakpoint.
Additional InformationIn PhpStorm we implemented a workaround for this problem and maintains our own evaluation cache in global variable $GLOBALS['IDE_EVAL_CACHE']. See attached xdebug log for more details.

We assign an unique array key for every evaluated expression. When user ask for more children level we actually invoke property_get command for the expression substitutor.
TagsNo tags attached.
Operating System
PHP Version5.3.8

Activities

nnmatveev

2011-10-24 23:00

reporter  

xdebug.log (37,415 bytes)

derick

2014-02-27 20:10

administrator   ~0002726

The eval'ed return only exists for a brief moment, and I will not keep the result around with some special hack so that you can request sub-properties. Eval is not made for requesting random properties as I have explained many times.

Issue History

Date Modified Username Field Change
2011-10-24 23:00 nnmatveev New Issue
2011-10-24 23:00 nnmatveev File Added: xdebug.log
2014-02-27 20:10 derick Note Added: 0002726
2014-02-27 20:10 derick Status new => resolved
2014-02-27 20:10 derick Resolution open => won't fix
2014-02-27 20:10 derick Assigned To => derick
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)