View Issue Details

IDProjectCategoryView StatusLast Update
0001309XdebugStep Debuggingpublic2020-03-12 16:51
Reporterniloct Assigned Toderick  
PriorityhighSeveritymajorReproducibilityalways
Status resolvedResolutionduplicate 
PlatformMacOSEl CaptainOS Version10.11.5
Product Version2.4.0 
Summary0001309: Changing context with context_get and evaluating property in this new context gets null value
Description

Is eval only supposed to work with context stack depth = 0 ?

When I fetch a stack depth > 1, then try to eval a variable which exists in this stack depth context, null is returned.

Steps To Reproduce

Run the below code with a breakpoint set on the commented line, then issue a command "context-get -d 1" (change stack depth to 1), then "eval $A". The result is null instead of the array.

=========================8<======================

<?php

function B() {
$B = array();

for ($i = 0; $i &lt; 10; $i++) {
    $B[$i] = 'B>>Item num: ' . ($i+1); /* Place bp here */
}

}

$A = array();

for ($i = 0; $i < 10; $i++) {
$A[$i] = 'Item num: ' . ($i+1);
}

B();

Additional Information

See attached xdebug.log

TagsNo tags attached.
Attached Files
xdebug.log (4,524 bytes)
Operating SystemMac OS X El Captain
PHP Version5.5.30-5.5.34

Relationships

duplicate of 0001342 acknowledgedderick Support -d parameter for eval 

Activities

niloct

2016-06-09 21:08

reporter   ~0003629

Sorry, stack depth > 0

derick

2016-06-10 10:14

administrator   ~0003631

The context_get does not change the internal reference of the current stack frame. It only gets information for that.

Right now, the eval command does not support other stack depths besides "0". The protocol (https://xdebug.org/docs-dbgp.php#eval) also doesn't allow this possibility.

derick

2016-12-11 23:26

administrator   ~0004001

This is a duplicate of 0001342: Add support for -d to eval.

Issue History

Date Modified Username Field Change
2016-06-08 23:29 niloct New Issue
2016-06-08 23:29 niloct File Added: xdebug.log
2016-06-09 21:08 niloct Note Added: 0003629
2016-06-10 10:14 derick Note Added: 0003631
2016-06-10 10:14 derick Status new => resolved
2016-06-10 10:14 derick Resolution open => no change required
2016-06-10 10:14 derick Assigned To => derick
2016-07-11 15:37 derick Assigned To derick =>
2016-07-11 15:37 derick Status resolved => new
2016-07-11 15:37 derick Category Debug client (console) => Feature/Change request
2016-12-11 23:26 derick Note Added: 0004001
2016-12-11 23:26 derick Relationship added duplicate of 0001342
2016-12-11 23:26 derick Status new => resolved
2016-12-11 23:26 derick Resolution no change required => duplicate
2016-12-11 23:26 derick Assigned To => derick
2020-03-12 16:51 derick Category Feature/Change request => Step Debugging